diff --git a/src/slic3r/GUI/GUI_Factories.cpp b/src/slic3r/GUI/GUI_Factories.cpp index c79a4d5f3..7204cc704 100644 --- a/src/slic3r/GUI/GUI_Factories.cpp +++ b/src/slic3r/GUI/GUI_Factories.cpp @@ -305,7 +305,7 @@ static ObjectDataViewModel* list_model() static const Selection& get_selection() { - return plater()->canvas3D()->get_selection(); + return plater()->get_current_canvas3D(true)->get_selection(); } // category -> vector ( option ; label ) @@ -747,7 +747,7 @@ void MenuFactory::append_menu_items_flush_options(wxMenu* menu) DynamicPrintConfig& global_config = wxGetApp().preset_bundle->prints.get_edited_preset().config; ModelConfig& select_object_config = object_list->object(selection.get_object_idx())->config; - + auto keys = select_object_config.keys(); for (auto key : FREQ_SETTINGS_BUNDLE_FFF["Flush options"]) { if (find(keys.begin(), keys.end(), key) == keys.end()) { diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index ff480beb7..a3cf24a6b 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -1830,7 +1830,7 @@ struct Plater::priv bool is_view3D_layers_editing_enabled() const { return (current_panel == view3D) && view3D->get_canvas3d()->is_layers_editing_enabled(); } void set_current_canvas_as_dirty(); - GLCanvas3D* get_current_canvas3D(); + GLCanvas3D* get_current_canvas3D(bool exclude_preview = false); void unbind_canvas_event_handlers(); void reset_canvas_volumes(); @@ -6585,11 +6585,11 @@ void Plater::priv::set_current_canvas_as_dirty() assemble_view->set_as_dirty(); } -GLCanvas3D* Plater::priv::get_current_canvas3D() +GLCanvas3D* Plater::priv::get_current_canvas3D(bool exclude_preview) { if (current_panel == view3D) return view3D->get_canvas3d(); - else if (current_panel == preview) + else if (!exclude_preview && (current_panel == preview)) return preview->get_canvas3d(); else if (current_panel == assemble_view) return assemble_view->get_canvas3d(); @@ -10263,9 +10263,9 @@ GLCanvas3D* Plater::get_assmeble_canvas3D() return nullptr; } -GLCanvas3D* Plater::get_current_canvas3D() +GLCanvas3D* Plater::get_current_canvas3D(bool exclude_preview) { - return p->get_current_canvas3D(); + return p->get_current_canvas3D(exclude_preview); } void Plater::arrange() diff --git a/src/slic3r/GUI/Plater.hpp b/src/slic3r/GUI/Plater.hpp index 1b930a0fd..d2a7848e2 100644 --- a/src/slic3r/GUI/Plater.hpp +++ b/src/slic3r/GUI/Plater.hpp @@ -402,7 +402,7 @@ public: bool is_single_full_object_selection() const; GLCanvas3D* canvas3D(); const GLCanvas3D * canvas3D() const; - GLCanvas3D* get_current_canvas3D(); + GLCanvas3D* get_current_canvas3D(bool exclude_preview = false); GLCanvas3D* get_view3D_canvas3D(); GLCanvas3D* get_preview_canvas3D(); GLCanvas3D* get_assmeble_canvas3D();