From 8c3df91f2e9453bb9190b21c76d567be189cd3a8 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Fri, 1 Mar 2019 10:46:28 +0100 Subject: [PATCH] Code cleanup --- src/libslic3r/Technologies.hpp | 2 -- src/slic3r/GUI/GUI_Preview.cpp | 8 -------- src/slic3r/GUI/GUI_Preview.hpp | 4 ---- src/slic3r/GUI/Plater.cpp | 6 ------ 4 files changed, 20 deletions(-) diff --git a/src/libslic3r/Technologies.hpp b/src/libslic3r/Technologies.hpp index 20f18cdee..755ca5ffa 100644 --- a/src/libslic3r/Technologies.hpp +++ b/src/libslic3r/Technologies.hpp @@ -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_ diff --git a/src/slic3r/GUI/GUI_Preview.cpp b/src/slic3r/GUI/GUI_Preview.cpp index f9f507571..22def0623 100644 --- a/src/slic3r/GUI/GUI_Preview.cpp +++ b/src/slic3r/GUI/GUI_Preview.cpp @@ -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; diff --git a/src/slic3r/GUI/GUI_Preview.hpp b/src/slic3r/GUI/GUI_Preview.hpp index 124be934d..d3cb4e5bf 100644 --- a/src/slic3r/GUI/GUI_Preview.hpp +++ b/src/slic3r/GUI/GUI_Preview.hpp @@ -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: diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 6d62e9d84..7a41e06e5 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -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"); }