Fix sidebar not shown when open 3mf file from command line arg (#3172)

* Show sidebar when open file from cmd

* Fix issue that sidebar collapse button is not enabled when load 3mf file with gcode
This commit is contained in:
Noisyfox 2023-12-19 11:15:26 +08:00 committed by GitHub
parent 60a9b38404
commit cc06a2e83b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View file

@ -5828,8 +5828,10 @@ void Plater::priv::set_current_panel(wxPanel* panel, bool no_slice)
};
//BBS: add the collapse logic
if (panel == preview) {
this->enable_sidebar(!q->only_gcode_mode());
}
if (panel == preview && q->only_gcode_mode()) {
this->enable_sidebar(false);
preview->get_canvas3d()->enable_select_plate_toolbar(false);
}
else if (panel == preview && q->using_exported_file() && (q->m_valid_plates_count <= 1)) {