FIX:hide advanced options when device incompatible

jira:[STUDIO-9973]

Change-Id: I34338e8f87ccc709d4a9f69ce16af17269c91784
(cherry picked from commit b675a2e4331ef5704d6b99804ac6c0d39979e3bb)
This commit is contained in:
tao wang 2025-01-19 17:10:38 +08:00 committed by Noisyfox
parent 6a2fa8e648
commit 2a8badec9f

View file

@ -581,12 +581,16 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
advanced_options_title->Bind(wxEVT_ENTER_WINDOW, [this](auto &e) {SetCursor(wxCURSOR_HAND);});
advanced_options_title->Bind(wxEVT_LEAVE_WINDOW, [this](auto &e) {SetCursor(wxCURSOR_ARROW);});
advanced_options_title->Bind(wxEVT_LEFT_DOWN, [this](auto& e) {
if (m_options_other->IsShown()) {
if (m_print_status == PrintStatusUnsupportedPrinter) {
m_options_other->Hide();
m_advanced_options_icon->SetBitmap(create_scaled_bitmap("advanced_option1", this, 18));
} else {
m_options_other->Show();
m_advanced_options_icon->SetBitmap(create_scaled_bitmap("advanced_option2", this, 18));
if (m_options_other->IsShown()) {
m_options_other->Hide();
m_advanced_options_icon->SetBitmap(create_scaled_bitmap("advanced_option1", this, 18));
} else {
m_options_other->Show();
m_advanced_options_icon->SetBitmap(create_scaled_bitmap("advanced_option2", this, 18));
}
}
Layout();
Fit();