Fix wxEVT_UPDATE_UI event been consumed by wrong control (#9061)

* Fix `wxEVT_UPDATE_UI` event been consumed by wrong control (SoftFever/OrcaSlicer#9059)
This commit is contained in:
Noisyfox 2025-04-02 22:48:32 +08:00 committed by GitHub
parent 2e9c30883b
commit 0cb458db89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2681,7 +2681,7 @@ void MainFrame::init_menubar_as_editor()
viewMenu->Check(wxID_CAMERA_PERSPECTIVE + camera_id_base, true);
else
viewMenu->Check(wxID_CAMERA_ORTHOGONAL + camera_id_base, true);
}, wxID_ANY);
}, perspective_item->GetId());
append_menu_check_item(viewMenu, wxID_ANY, _L("Auto Perspective"), _L("Automatically switch between orthographic and perspective when changing from top/bottom/side views"),
[this](wxCommandEvent&) {
wxGetApp().app_config->set_bool("auto_perspective", !wxGetApp().app_config->get_bool("auto_perspective"));