mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Fixed redo_to() function and code cleaning from redundant options
This commit is contained in:
parent
f985f5190c
commit
3720e6a3a3
4 changed files with 27 additions and 60 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue