mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 17:27:52 -06:00
Added item menu 'Edit/Show labels' and removed labels activation from preferences dialog
This commit is contained in:
parent
9f536291b0
commit
3ec4b77dcd
9 changed files with 43 additions and 35 deletions
|
@ -381,13 +381,14 @@ private:
|
|||
class Labels
|
||||
{
|
||||
bool m_enabled{ false };
|
||||
bool m_shown{ false };
|
||||
GLCanvas3D& m_canvas;
|
||||
|
||||
public:
|
||||
explicit Labels(GLCanvas3D& canvas) : m_canvas(canvas) {}
|
||||
void enable(bool enable) { m_enabled = enable; }
|
||||
void show(bool show);
|
||||
bool is_shown() const;
|
||||
void show(bool show) { m_shown = m_enabled ? show : false; }
|
||||
bool is_shown() const { return m_shown; }
|
||||
void render(const std::vector<const PrintInstance*>& sorted_instances) const;
|
||||
};
|
||||
#endif // ENABLE_SHOW_SCENE_LABELS
|
||||
|
@ -676,6 +677,11 @@ public:
|
|||
|
||||
void mouse_up_cleanup();
|
||||
|
||||
#if ENABLE_SHOW_SCENE_LABELS
|
||||
bool are_labels_shown() const { return m_labels.is_shown(); }
|
||||
void show_labels(bool show) { m_labels.show(show); }
|
||||
#endif // ENABLE_SHOW_SCENE_LABELS
|
||||
|
||||
private:
|
||||
bool _is_shown_on_screen() const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue