mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-06 23:31:19 +00:00
Make the Design tab sidebar dockable and collapsible like Prepare's
The sidebar can move to either side, float, be resized, and collapse with the canvas button or Shift+Tab. Its layout is remembered separately from Prepare's, starts where Prepare's sidebar is, and View > Reset Window Layout resets both tabs.
This commit is contained in:
@@ -1249,6 +1249,10 @@ void MainFrame::shutdown()
|
||||
m_plugin_pages.shutdown();
|
||||
if (m_plater != nullptr)
|
||||
m_plater->remove_dock_panes();
|
||||
#ifdef SLIC3R_CAD
|
||||
if (DesignPanel* design = DesignPanel::if_built())
|
||||
design->shutdown();
|
||||
#endif
|
||||
#ifdef __WXGTK__
|
||||
// Edge panels are child windows — wxWidgets destroys them automatically.
|
||||
m_edge_bottom = nullptr;
|
||||
@@ -3377,6 +3381,10 @@ void MainFrame::init_menubar_as_editor()
|
||||
viewMenu, wxID_ANY, _L("Reset Window Layout"), _L("Reset to default window layout"),
|
||||
[this](wxCommandEvent&) { m_plater->reset_window_layout(); }, "", this,
|
||||
[this]() {
|
||||
#ifdef SLIC3R_CAD
|
||||
if (shown_design_panel() != nullptr)
|
||||
return true;
|
||||
#endif
|
||||
return is_prepare_or_preview_tab() && m_plater->is_sidebar_enabled();
|
||||
},
|
||||
this);
|
||||
|
||||
Reference in New Issue
Block a user