Added item menu 'Edit/Show labels' and removed labels activation from preferences dialog

This commit is contained in:
Enrico Turri 2020-02-04 14:42:26 +01:00
parent 9f536291b0
commit 3ec4b77dcd
9 changed files with 43 additions and 35 deletions

View file

@ -1238,21 +1238,6 @@ void GLCanvas3D::LegendTexture::render(const GLCanvas3D& canvas) const
}
#if ENABLE_SHOW_SCENE_LABELS
void GLCanvas3D::Labels::show(bool show)
{
bool shown = is_shown();
if (shown != show)
{
wxGetApp().app_config->set("show_labels", show ? "1" : "0");
wxGetApp().app_config->save();
}
}
bool GLCanvas3D::Labels::is_shown() const
{
return wxGetApp().app_config->get("show_labels") == "1";
}
void GLCanvas3D::Labels::render(const std::vector<const PrintInstance*>& sorted_instances) const
{
if (!m_enabled || !is_shown())