mirror of
https://github.com/QIDITECH/QIDIStudio.git
synced 2026-01-31 00:48:41 +03:00
fix some bug
This commit is contained in:
@@ -2605,14 +2605,13 @@ const Preset* PresetCollection::get_preset_parent(const Preset& child) const
|
|||||||
const Preset *PresetCollection::get_preset_base(const Preset &child) const
|
const Preset *PresetCollection::get_preset_base(const Preset &child) const
|
||||||
{
|
{
|
||||||
//y60
|
//y60
|
||||||
//if (child.is_system || child.is_default)
|
if (child.is_system || child.is_default)
|
||||||
// return &child;
|
return &child;
|
||||||
//// Handle user preset
|
// Handle user preset
|
||||||
//if (child.inherits().empty())
|
if (child.inherits().empty())
|
||||||
// return &child; // this is user root
|
return &child; // this is user root
|
||||||
//auto inherits = find_preset(child.inherits());
|
auto inherits = find_preset(child.inherits());
|
||||||
//return inherits ? get_preset_base(*inherits) : nullptr;
|
return inherits ? get_preset_base(*inherits) : nullptr;
|
||||||
return &child;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return vendor of the first parent profile, for which the vendor is defined, or null if such profile does not exist.
|
// Return vendor of the first parent profile, for which the vendor is defined, or null if such profile does not exist.
|
||||||
|
|||||||
@@ -2565,7 +2565,9 @@ bool Sidebar::reset_bed_type_combox_choices() {
|
|||||||
const VendorProfile::PrinterModel *pm = PresetUtils::system_printer_model(*curr);
|
const VendorProfile::PrinterModel *pm = PresetUtils::system_printer_model(*curr);
|
||||||
if (!pm) {
|
if (!pm) {
|
||||||
auto curr_parent = bundle->printers.get_selected_preset_parent();
|
auto curr_parent = bundle->printers.get_selected_preset_parent();
|
||||||
pm = PresetUtils::system_printer_model(*curr_parent);
|
//y62
|
||||||
|
if(curr_parent)
|
||||||
|
pm = PresetUtils::system_printer_model(*curr_parent);
|
||||||
}
|
}
|
||||||
//y58
|
//y58
|
||||||
//if (m_last_combo_bedtype_count != 0 && pm) {
|
//if (m_last_combo_bedtype_count != 0 && pm) {
|
||||||
|
|||||||
Reference in New Issue
Block a user