Code cleanup
This commit is contained in:
parent
058468d371
commit
8c3df91f2e
4 changed files with 0 additions and 20 deletions
|
@ -58,7 +58,5 @@
|
|||
|
||||
// Printbed textures generated from svg files
|
||||
#define ENABLE_TEXTURES_FROM_SVG (1 && ENABLE_1_42_0_ALPHA7)
|
||||
// Do not regenerate GLVolumes for gcode preview if not needed
|
||||
#define ENABLE_NO_GCODE_TOOLPATHS_REGENERATION (1 && ENABLE_1_42_0_ALPHA7)
|
||||
|
||||
#endif // _technologies_h_
|
||||
|
|
|
@ -418,22 +418,14 @@ void Preview::load_print()
|
|||
load_print_as_sla();
|
||||
}
|
||||
|
||||
#if ENABLE_NO_GCODE_TOOLPATHS_REGENERATION
|
||||
void Preview::reload_print(bool force, bool keep_volumes)
|
||||
#else
|
||||
void Preview::reload_print(bool force)
|
||||
#endif // ENABLE_NO_GCODE_TOOLPATHS_REGENERATION
|
||||
{
|
||||
#if ENABLE_NO_GCODE_TOOLPATHS_REGENERATION
|
||||
if (!keep_volumes)
|
||||
{
|
||||
#endif // ENABLE_NO_GCODE_TOOLPATHS_REGENERATION
|
||||
m_canvas->reset_volumes();
|
||||
m_canvas->reset_legend_texture();
|
||||
m_loaded = false;
|
||||
#if ENABLE_NO_GCODE_TOOLPATHS_REGENERATION
|
||||
}
|
||||
#endif // ENABLE_NO_GCODE_TOOLPATHS_REGENERATION
|
||||
|
||||
if (!IsShown() && !force)
|
||||
return;
|
||||
|
|
|
@ -129,11 +129,7 @@ public:
|
|||
void set_drop_target(wxDropTarget* target);
|
||||
|
||||
void load_print();
|
||||
#if ENABLE_NO_GCODE_TOOLPATHS_REGENERATION
|
||||
void reload_print(bool force = false, bool keep_volumes = false);
|
||||
#else
|
||||
void reload_print(bool force = false);
|
||||
#endif // ENABLE_NO_GCODE_TOOLPATHS_REGENERATION
|
||||
void refresh_print();
|
||||
|
||||
private:
|
||||
|
|
|
@ -1997,11 +1997,9 @@ void Plater::priv::schedule_background_process()
|
|||
this->background_process_timer.Start(500, wxTIMER_ONE_SHOT);
|
||||
// Notify the Canvas3D that something has changed, so it may invalidate some of the layer editing stuff.
|
||||
this->view3D->get_canvas3d()->set_config(this->config);
|
||||
#if ENABLE_NO_GCODE_TOOLPATHS_REGENERATION
|
||||
// Reset gcode preview
|
||||
this->preview->get_canvas3d()->reset_volumes();
|
||||
this->preview->get_canvas3d()->reset_legend_texture();
|
||||
#endif // ENABLE_NO_GCODE_TOOLPATHS_REGENERATION
|
||||
}
|
||||
|
||||
void Plater::priv::update_print_volume_state()
|
||||
|
@ -2266,12 +2264,8 @@ void Plater::priv::set_current_panel(wxPanel* panel)
|
|||
else if (current_panel == preview)
|
||||
{
|
||||
this->q->reslice();
|
||||
#if ENABLE_NO_GCODE_TOOLPATHS_REGENERATION
|
||||
// keeps current gcode preview, if any
|
||||
preview->reload_print(false, true);
|
||||
#else
|
||||
preview->reload_print();
|
||||
#endif // ENABLE_NO_GCODE_TOOLPATHS_REGENERATION
|
||||
preview->set_canvas_as_dirty();
|
||||
view_toolbar.select_item("Preview");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue