Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2019-07-02 16:26:11 +0300
committerYuSanka <yusanka@gmail.com>2019-07-02 16:26:11 +0300
commit0bcad2a5c52b774eba6472077cbe6cb786c20f27 (patch)
treef9e50e847d7733998ba72842de1adbcde3fff40f /src/slic3r/GUI/GUI_ObjectLayers.cpp
parentb835075fd64e82c36ea821cd326b3f3ecd005356 (diff)
Fix for the last commit
Diffstat (limited to 'src/slic3r/GUI/GUI_ObjectLayers.cpp')
-rw-r--r--src/slic3r/GUI/GUI_ObjectLayers.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/slic3r/GUI/GUI_ObjectLayers.cpp b/src/slic3r/GUI/GUI_ObjectLayers.cpp
index f9d3a8956..b30d3ecd3 100644
--- a/src/slic3r/GUI/GUI_ObjectLayers.cpp
+++ b/src/slic3r/GUI/GUI_ObjectLayers.cpp
@@ -197,25 +197,17 @@ void ObjectLayers::update_layers_list()
// Add new control according to the selected item
if (type & itLayerRoot)
- {
- wxGetApp().plater()->canvas3D()->handle_sidebar_focus_event("", false);
- m_selectable_range = { 0.0, 0.0 };
create_layers_list();
- }
else
- {
- t_layer_height_range range = objects_ctrl->GetModel()->GetLayerRangeByItem(item);
- create_layer(range);
- update_scene_from_editor_selection(range, etLayerHeight);
- }
+ create_layer(objects_ctrl->GetModel()->GetLayerRangeByItem(item));
m_parent->Layout();
}
-void ObjectLayers::update_scene_from_editor_selection(const t_layer_height_range& range, EditorType type) const
+void ObjectLayers::update_scene_from_editor_selection() const
{
// needed to show the visual hints in 3D scene
- wxGetApp().plater()->canvas3D()->handle_layers_data_focus_event(range, type);
+ wxGetApp().plater()->canvas3D()->handle_layers_data_focus_event(m_selectable_range, m_selection_type);
}
void ObjectLayers::UpdateAndShow(const bool show)
@@ -232,6 +224,12 @@ void ObjectLayers::msw_rescale()
m_bmp_add.msw_rescale();
}
+void ObjectLayers::reset_selection()
+{
+ m_selectable_range = { 0.0, 0.0 };
+ m_selection_type = etLayerHeight;
+}
+
LayerRangeEditor::LayerRangeEditor( ObjectLayers* parent,
const wxString& value,
EditorType type,
@@ -297,7 +295,7 @@ LayerRangeEditor::LayerRangeEditor( ObjectLayers* parent,
this->Bind(wxEVT_SET_FOCUS, [this, parent](wxFocusEvent& e)
{
set_focus_data();
- parent->update_scene_from_editor_selection(parent->get_selectable_range(), parent->get_selection_type());
+ parent->update_scene_from_editor_selection();
e.Skip();
}, this->GetId());