FIX: fix a bug when searching a printer

JIRA: STUDIO-5009

Change-Id: I55be7b295882af6090e2528a03baef490bf4bfe6
Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
Stone Li 2023-10-31 09:15:49 +08:00 committed by Lane.Wei
parent 65c693ae24
commit 5ad7b17688
1 changed files with 10 additions and 9 deletions

View File

@ -552,15 +552,6 @@ void SelectMachinePopup::update_other_devices()
MachineObjectPanel* op = nullptr;
if (i < m_other_list_machine_panel.size()) {
op = m_other_list_machine_panel[i]->mPanel;
#if !BBL_RELEASE_TO_PUBLIC && defined(__WINDOWS__)
if (!search_for_printer(mobj)) {
op->Hide();
} else {
op->Show();
}
#else
op->Show();
#endif
} else {
op = new MachineObjectPanel(m_scrolledWindow, wxID_ANY);
MachinePanel* mpanel = new MachinePanel();
@ -569,6 +560,16 @@ void SelectMachinePopup::update_other_devices()
m_other_list_machine_panel.push_back(mpanel);
m_sizer_other_devices->Add(op, 0, wxEXPAND, 0);
}
#if !BBL_RELEASE_TO_PUBLIC && defined(__WINDOWS__)
if (!search_for_printer(mobj)) {
op->Hide();
}
else {
op->Show();
}
#else
op->Show();
#endif
i++;
op->update_machine_info(mobj);