Fixed redo_to() function and code cleaning from redundant options

This commit is contained in:
YuSanka 2019-07-10 10:15:07 +02:00
parent f985f5190c
commit 3720e6a3a3
4 changed files with 27 additions and 60 deletions

View file

@ -252,10 +252,7 @@ private:
MouseCapture m_mouse_capture;
std::string m_tooltip;
bool m_undo_imgui_visible {false};
bool m_redo_imgui_visible {false};
int m_imgui_hovered_pos { -1 };
int m_imgui_selected_pos { -1 };
public:
#if ENABLE_SVG_ICONS
@ -312,22 +309,9 @@ public:
bool on_mouse(wxMouseEvent& evt, GLCanvas3D& parent);
// undo == true => "undo" imgui is activated
// undo == false => "redo" imgui is activated
bool get_imgui_visible(const bool undo) const { return undo ? m_undo_imgui_visible : m_redo_imgui_visible; }
void hide_imgui(const bool undo) { undo ? m_undo_imgui_visible = false : m_redo_imgui_visible = false; }
void activate_imgui(const bool undo) {
m_undo_imgui_visible = undo;
m_redo_imgui_visible = !undo;
m_imgui_hovered_pos = m_imgui_selected_pos = -1;
}
void set_imgui_hovered_pos(int pos = -1) { m_imgui_hovered_pos = pos; }
int get_imgui_hovered_pos() const { return m_imgui_hovered_pos; }
void set_imgui_selected_pos(int pos = -1) { m_imgui_selected_pos = pos; }
int get_imgui_selected_pos() const { return m_imgui_selected_pos; }
private:
void calc_layout() const;
float get_width_horizontal() const;