mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Code cleanup
This commit is contained in:
parent
964209f89b
commit
6370902a1b
1 changed files with 0 additions and 20 deletions
|
@ -945,9 +945,7 @@ struct Plater::priv
|
||||||
void select_view(const std::string& direction);
|
void select_view(const std::string& direction);
|
||||||
#if ENABLE_REMOVE_TABS_FROM_PLATER
|
#if ENABLE_REMOVE_TABS_FROM_PLATER
|
||||||
void select_view_3D(const std::string& name);
|
void select_view_3D(const std::string& name);
|
||||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
||||||
void select_next_view_3D();
|
void select_next_view_3D();
|
||||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
||||||
#endif // ENABLE_REMOVE_TABS_FROM_PLATER
|
#endif // ENABLE_REMOVE_TABS_FROM_PLATER
|
||||||
void update_ui_from_settings();
|
void update_ui_from_settings();
|
||||||
ProgressStatusBar* statusbar();
|
ProgressStatusBar* statusbar();
|
||||||
|
@ -1121,11 +1119,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
||||||
view3D = new View3D(q, &model, config, &background_process);
|
view3D = new View3D(q, &model, config, &background_process);
|
||||||
preview = new Preview(q, config, &background_process, &gcode_preview_data, [this](){ schedule_background_process(); });
|
preview = new Preview(q, config, &background_process, &gcode_preview_data, [this](){ schedule_background_process(); });
|
||||||
// Let the Tab key switch between the 3D view and the layer preview.
|
// Let the Tab key switch between the 3D view and the layer preview.
|
||||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
||||||
this->q->Bind(wxEVT_NAVIGATION_KEY, [this](wxNavigationKeyEvent &evt) { if (evt.IsFromTab()) this->select_next_view_3D(); });
|
this->q->Bind(wxEVT_NAVIGATION_KEY, [this](wxNavigationKeyEvent &evt) { if (evt.IsFromTab()) this->select_next_view_3D(); });
|
||||||
// view3D->Bind(wxEVT_NAVIGATION_KEY, [this](wxNavigationKeyEvent &evt) { if (evt.IsFromTab()) this->q->select_view_3D("Preview"); });
|
|
||||||
// preview->Bind(wxEVT_NAVIGATION_KEY, [this](wxNavigationKeyEvent &evt) { if (evt.IsFromTab()) this->q->select_view_3D("3D"); });
|
|
||||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
||||||
|
|
||||||
panels.push_back(view3D);
|
panels.push_back(view3D);
|
||||||
panels.push_back(preview);
|
panels.push_back(preview);
|
||||||
|
@ -1306,17 +1300,8 @@ void Plater::priv::select_view_3D(const std::string& name)
|
||||||
set_current_panel(view3D);
|
set_current_panel(view3D);
|
||||||
else if (name == "Preview")
|
else if (name == "Preview")
|
||||||
set_current_panel(preview);
|
set_current_panel(preview);
|
||||||
|
|
||||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
||||||
//#if ENABLE_TOOLBAR_BACKGROUND_TEXTURE
|
|
||||||
// view_toolbar.select_item(name);
|
|
||||||
//#else
|
|
||||||
// view_toolbar.set_selection(name);
|
|
||||||
//#endif // ENABLE_TOOLBAR_BACKGROUND_TEXTURE
|
|
||||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
||||||
void Plater::priv::select_next_view_3D()
|
void Plater::priv::select_next_view_3D()
|
||||||
{
|
{
|
||||||
if (current_panel == view3D)
|
if (current_panel == view3D)
|
||||||
|
@ -1324,7 +1309,6 @@ void Plater::priv::select_next_view_3D()
|
||||||
else if (current_panel == preview)
|
else if (current_panel == preview)
|
||||||
set_current_panel(view3D);
|
set_current_panel(view3D);
|
||||||
}
|
}
|
||||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
||||||
#else
|
#else
|
||||||
void Plater::priv::select_view(const std::string& direction)
|
void Plater::priv::select_view(const std::string& direction)
|
||||||
{
|
{
|
||||||
|
@ -2263,18 +2247,14 @@ void Plater::priv::set_current_panel(wxPanel* panel)
|
||||||
}
|
}
|
||||||
// sets the canvas as dirty to force a render at the 1st idle event (wxWidgets IsShownOnScreen() is buggy and cannot be used reliably)
|
// sets the canvas as dirty to force a render at the 1st idle event (wxWidgets IsShownOnScreen() is buggy and cannot be used reliably)
|
||||||
view3D->set_as_dirty();
|
view3D->set_as_dirty();
|
||||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
||||||
view_toolbar.select_item("3D");
|
view_toolbar.select_item("3D");
|
||||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
||||||
}
|
}
|
||||||
else if (current_panel == preview)
|
else if (current_panel == preview)
|
||||||
{
|
{
|
||||||
this->q->reslice();
|
this->q->reslice();
|
||||||
preview->reload_print();
|
preview->reload_print();
|
||||||
preview->set_canvas_as_dirty();
|
preview->set_canvas_as_dirty();
|
||||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
||||||
view_toolbar.select_item("Preview");
|
view_toolbar.select_item("Preview");
|
||||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue