mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
FIX: Client uses default preset when reopening from project with non-local printer
Change-Id: Ieded9d63338d74ca841e89aca16a9510355ee417 Jira: STUDIO-13490 (cherry picked from commit df2ee1cc533e2a7f5f71b4d880b08a6665b028ee)
This commit is contained in:
@@ -2746,7 +2746,7 @@ size_t PresetCollection::first_visible_idx() const
|
|||||||
size_t first_visible = -1;
|
size_t first_visible = -1;
|
||||||
size_t idx = m_default_suppressed ? m_num_default_presets : 0;
|
size_t idx = m_default_suppressed ? m_num_default_presets : 0;
|
||||||
for (; idx < m_presets.size(); ++ idx)
|
for (; idx < m_presets.size(); ++ idx)
|
||||||
if (m_presets[idx].is_visible) {
|
if (m_presets[idx].is_visible && m_presets[idx].get_printer_id() == "BBL") {
|
||||||
if (first_visible == -1)
|
if (first_visible == -1)
|
||||||
first_visible = idx;
|
first_visible = idx;
|
||||||
if (m_type != Preset::TYPE_FILAMENT)
|
if (m_type != Preset::TYPE_FILAMENT)
|
||||||
@@ -2758,8 +2758,12 @@ size_t PresetCollection::first_visible_idx() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (first_visible == -1)
|
if (first_visible == -1) {
|
||||||
first_visible = 0;
|
if (m_presets.size() > 1 && m_default_suppressed)
|
||||||
|
first_visible = m_presets.size() == m_num_default_presets ? 0 : m_num_default_presets;
|
||||||
|
else
|
||||||
|
first_visible = 0;
|
||||||
|
}
|
||||||
return first_visible;
|
return first_visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -335,6 +335,7 @@ public:
|
|||||||
std::string get_current_printer_type(PresetBundle *preset_bundle); // get current preset type
|
std::string get_current_printer_type(PresetBundle *preset_bundle); // get current preset type
|
||||||
|
|
||||||
static void get_extruder_names_and_keysets(Type type, std::string& extruder_id_name, std::string& extruder_variant_name, std::set<std::string>** p_key_set1, std::set<std::string>** p_key_set2);
|
static void get_extruder_names_and_keysets(Type type, std::string& extruder_id_name, std::string& extruder_variant_name, std::set<std::string>** p_key_set1, std::set<std::string>** p_key_set2);
|
||||||
|
std::string get_printer_id() const { return vendor ? vendor->id : ""; }
|
||||||
|
|
||||||
bool has_lidar(PresetBundle *preset_bundle);
|
bool has_lidar(PresetBundle *preset_bundle);
|
||||||
bool is_custom_defined();
|
bool is_custom_defined();
|
||||||
|
|||||||
Reference in New Issue
Block a user