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-06-26 14:30:20 +0300
committerYuSanka <yusanka@gmail.com>2019-06-26 14:30:20 +0300
commit104a289cfe48d20cfdea03cac0e10c1e7ca7beee (patch)
treefdda7b440efb7054520e9f2c973e3c0b1f5570f4 /src/slic3r/GUI/GUI_ObjectLayers.hpp
parentc198d826af9ead36c511b63b88363335e72487e0 (diff)
Implemented interface for updating 3DScene after set a focus to some editor
Diffstat (limited to 'src/slic3r/GUI/GUI_ObjectLayers.hpp')
-rw-r--r--src/slic3r/GUI/GUI_ObjectLayers.hpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/slic3r/GUI/GUI_ObjectLayers.hpp b/src/slic3r/GUI/GUI_ObjectLayers.hpp
index e3366e03e..f19217fbe 100644
--- a/src/slic3r/GUI/GUI_ObjectLayers.hpp
+++ b/src/slic3r/GUI/GUI_ObjectLayers.hpp
@@ -19,6 +19,8 @@ class ConfigOptionsGroup;
typedef double coordf_t;
typedef std::pair<coordf_t, coordf_t> t_layer_height_range;
+class ObjectLayers;
+
enum EditorType
{
etUndef = 0,
@@ -34,19 +36,19 @@ class LayerRangeEditor : public wxTextCtrl
wxString m_valid_value;
EditorType m_type;
- std::function<void(EditorType)> m_set_focus;
+ std::function<void(EditorType)> m_set_focus_data;
public:
- LayerRangeEditor( wxWindow* parent,
+ LayerRangeEditor( ObjectLayers* parent,
const wxString& value = wxEmptyString,
EditorType type = etUndef,
- std::function<void(EditorType)> set_focus_fn = [](EditorType) {;},
- std::function<bool(coordf_t, bool)> edit_fn = [](coordf_t, bool) {return false; }
+ std::function<void(EditorType)> set_focus_data_fn = [](EditorType) {;},
+ std::function<bool(coordf_t, bool)> edit_fn = [](coordf_t, bool) {return false; }
);
~LayerRangeEditor() {}
EditorType type() const {return m_type;}
- void set_focus() const { m_set_focus(m_type);}
+ void set_focus_data() const { m_set_focus_data(m_type);}
private:
coordf_t get_value();
@@ -71,8 +73,12 @@ public:
void create_layers_list();
void update_layers_list();
+ void update_scene_from_editor_selection() const;
+
void UpdateAndShow(const bool show) override;
void msw_rescale();
+
+ friend class LayerRangeEditor;
};
}}