FIX: should not display sync dialog when open obj file

2. select machine with unchecked presets, cannot get the corresponding machine preset
jira: 9070 9065

Change-Id: Ic971a17eef464bead4f247d769ab6be4facb68d1
(cherry picked from commit a297b57249ed1ab8689506c64d12e39328647cf9)
This commit is contained in:
zhimin.zeng
2024-12-07 14:36:55 +08:00
committed by Noisyfox
parent 07148d2dfd
commit f6bb871b38
2 changed files with 38 additions and 34 deletions

View File

@@ -439,6 +439,8 @@ void PresetComboBox::add_connected_printers(std::string selected, bool alias_nam
set_label_marker(Append(separator(L("My Printer")), wxNullBitmap));
m_first_printer_idx = GetCount();
for (auto iter = machine_list.begin(); iter != machine_list.end(); ++iter) {
Preset* printer_preset = get_printer_preset(iter->second);
printer_preset->is_visible = true;
int item_id = Append(from_u8(iter->second->dev_name), wxNullBitmap, &m_first_printer_idx + std::distance(machine_list.begin(), iter));
}
m_last_printer_idx = GetCount();