Merge branch 'master' of https://github.com/prusa3d/Slic3r into objects_centering
This commit is contained in:
commit
270a57c14c
3 changed files with 4 additions and 14 deletions
|
@ -169,10 +169,8 @@ bool GUI_App::OnInit()
|
||||||
if (app_config->dirty())
|
if (app_config->dirty())
|
||||||
app_config->save();
|
app_config->save();
|
||||||
|
|
||||||
#if !ENABLE_IMPROVED_SIDEBAR_OBJECTS_MANIPULATION
|
|
||||||
if (this->plater() != nullptr)
|
if (this->plater() != nullptr)
|
||||||
this->obj_manipul()->update_if_dirty();
|
this->obj_manipul()->update_if_dirty();
|
||||||
#endif // !ENABLE_IMPROVED_SIDEBAR_OBJECTS_MANIPULATION
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// On OS X the UI tends to freeze in weird ways if modal dialogs(config wizard, update notifications, ...)
|
// On OS X the UI tends to freeze in weird ways if modal dialogs(config wizard, update notifications, ...)
|
||||||
|
|
|
@ -327,15 +327,14 @@ void ObjectManipulation::update_settings_value(const GLCanvas3D::Selection& sele
|
||||||
else
|
else
|
||||||
reset_settings_value();
|
reset_settings_value();
|
||||||
|
|
||||||
#if ENABLE_IMPROVED_SIDEBAR_OBJECTS_MANIPULATION
|
|
||||||
update_if_dirty();
|
|
||||||
#else
|
|
||||||
m_dirty = true;
|
m_dirty = true;
|
||||||
#endif // ENABLE_IMPROVED_SIDEBAR_OBJECTS_MANIPULATION
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectManipulation::update_if_dirty()
|
void ObjectManipulation::update_if_dirty()
|
||||||
{
|
{
|
||||||
|
if (!m_dirty)
|
||||||
|
return;
|
||||||
|
|
||||||
#if ENABLE_IMPROVED_SIDEBAR_OBJECTS_MANIPULATION
|
#if ENABLE_IMPROVED_SIDEBAR_OBJECTS_MANIPULATION
|
||||||
if (m_cache.move_label_string != _(m_new_move_label_string)+ ":")
|
if (m_cache.move_label_string != _(m_new_move_label_string)+ ":")
|
||||||
{
|
{
|
||||||
|
@ -414,9 +413,6 @@ void ObjectManipulation::update_if_dirty()
|
||||||
else
|
else
|
||||||
m_og->disable();
|
m_og->disable();
|
||||||
#else
|
#else
|
||||||
if (! m_dirty)
|
|
||||||
return;
|
|
||||||
|
|
||||||
m_move_Label->SetLabel(_(m_new_move_label_string));
|
m_move_Label->SetLabel(_(m_new_move_label_string));
|
||||||
m_rotate_Label->SetLabel(_(m_new_rotate_label_string));
|
m_rotate_Label->SetLabel(_(m_new_rotate_label_string));
|
||||||
m_scale_Label->SetLabel(_(m_new_scale_label_string));
|
m_scale_Label->SetLabel(_(m_new_scale_label_string));
|
||||||
|
@ -446,9 +442,9 @@ void ObjectManipulation::update_if_dirty()
|
||||||
m_og->enable();
|
m_og->enable();
|
||||||
else
|
else
|
||||||
m_og->disable();
|
m_og->disable();
|
||||||
|
#endif // ENABLE_IMPROVED_SIDEBAR_OBJECTS_MANIPULATION
|
||||||
|
|
||||||
m_dirty = false;
|
m_dirty = false;
|
||||||
#endif // ENABLE_IMPROVED_SIDEBAR_OBJECTS_MANIPULATION
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectManipulation::reset_settings_value()
|
void ObjectManipulation::reset_settings_value()
|
||||||
|
@ -461,9 +457,7 @@ void ObjectManipulation::reset_settings_value()
|
||||||
#if ENABLE_IMPROVED_SIDEBAR_OBJECTS_MANIPULATION
|
#if ENABLE_IMPROVED_SIDEBAR_OBJECTS_MANIPULATION
|
||||||
m_cache.instance.reset();
|
m_cache.instance.reset();
|
||||||
#endif // ENABLE_IMPROVED_SIDEBAR_OBJECTS_MANIPULATION
|
#endif // ENABLE_IMPROVED_SIDEBAR_OBJECTS_MANIPULATION
|
||||||
#if !ENABLE_IMPROVED_SIDEBAR_OBJECTS_MANIPULATION
|
|
||||||
m_dirty = true;
|
m_dirty = true;
|
||||||
#endif // !ENABLE_IMPROVED_SIDEBAR_OBJECTS_MANIPULATION
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectManipulation::change_position_value(const Vec3d& position)
|
void ObjectManipulation::change_position_value(const Vec3d& position)
|
||||||
|
|
|
@ -62,10 +62,8 @@ class ObjectManipulation : public OG_Settings
|
||||||
wxStaticText* m_scale_Label = nullptr;
|
wxStaticText* m_scale_Label = nullptr;
|
||||||
wxStaticText* m_rotate_Label = nullptr;
|
wxStaticText* m_rotate_Label = nullptr;
|
||||||
|
|
||||||
#if !ENABLE_IMPROVED_SIDEBAR_OBJECTS_MANIPULATION
|
|
||||||
// Needs to be updated from OnIdle?
|
// Needs to be updated from OnIdle?
|
||||||
bool m_dirty = false;
|
bool m_dirty = false;
|
||||||
#endif // !ENABLE_IMPROVED_SIDEBAR_OBJECTS_MANIPULATION
|
|
||||||
// Cached labels for the delayed update, not localized!
|
// Cached labels for the delayed update, not localized!
|
||||||
std::string m_new_move_label_string;
|
std::string m_new_move_label_string;
|
||||||
std::string m_new_rotate_label_string;
|
std::string m_new_rotate_label_string;
|
||||||
|
|
Loading…
Reference in a new issue