ENH: save uniform scale to an app_config item
Change-Id: Ib4a42597308382ea195d73776790e9cd4a122b76
This commit is contained in:
parent
c6d6784070
commit
2996affc55
|
@ -299,6 +299,10 @@ void AppConfig::set_defaults()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (get("uniform_scale").empty()) {
|
||||||
|
set("uniform_scale", "1");
|
||||||
|
}
|
||||||
|
|
||||||
// Remove legacy window positions/sizes
|
// Remove legacy window positions/sizes
|
||||||
erase("app", "main_frame_maximized");
|
erase("app", "main_frame_maximized");
|
||||||
erase("app", "main_frame_pos");
|
erase("app", "main_frame_pos");
|
||||||
|
|
|
@ -463,6 +463,9 @@ void GizmoObjectManipulation::set_uniform_scaling(const bool new_value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_uniform_scale = new_value;
|
m_uniform_scale = new_value;
|
||||||
|
AppConfig* config = wxGetApp().app_config;
|
||||||
|
if (config)
|
||||||
|
config->set("uniform_scale", new_value ? "1": "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char* label_values[2][3] = {
|
static const char* label_values[2][3] = {
|
||||||
|
@ -894,6 +897,9 @@ void GizmoObjectManipulation::do_render_scale_input_window(ImGuiWrapper* imgui_w
|
||||||
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
|
AppConfig* config = wxGetApp().app_config;
|
||||||
|
if (config)
|
||||||
|
this->m_uniform_scale = config->get("uniform_scale") == "1" ? true : false;
|
||||||
bool uniform_scale = this->m_uniform_scale;
|
bool uniform_scale = this->m_uniform_scale;
|
||||||
|
|
||||||
const Selection &selection = m_glcanvas.get_selection();
|
const Selection &selection = m_glcanvas.get_selection();
|
||||||
|
|
|
@ -81,6 +81,7 @@ public:
|
||||||
Vec3d m_buffered_size;
|
Vec3d m_buffered_size;
|
||||||
bool m_new_enabled {true};
|
bool m_new_enabled {true};
|
||||||
bool m_uniform_scale {true};
|
bool m_uniform_scale {true};
|
||||||
|
bool m_uniform_config {false};
|
||||||
// Does the object manipulation panel work in World or Local coordinates?
|
// Does the object manipulation panel work in World or Local coordinates?
|
||||||
bool m_world_coordinates = true;
|
bool m_world_coordinates = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue