Added "info" tooltip for a LockButton on Manipulation panel (#2539)
This commit is contained in:
parent
09f4831f4e
commit
fe395546f0
3 changed files with 13 additions and 3 deletions
|
@ -499,11 +499,13 @@ void ObjectManipulation::update_if_dirty()
|
||||||
|
|
||||||
if (selection.requires_uniform_scale()) {
|
if (selection.requires_uniform_scale()) {
|
||||||
m_lock_bnt->SetLock(true);
|
m_lock_bnt->SetLock(true);
|
||||||
m_lock_bnt->Disable();
|
m_lock_bnt->SetToolTip(_(L("You cann't use non-uniform scaling mode for multiple objects/parts selection")));
|
||||||
|
m_lock_bnt->disable();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_lock_bnt->SetLock(m_uniform_scale);
|
m_lock_bnt->SetLock(m_uniform_scale);
|
||||||
m_lock_bnt->Enable();
|
m_lock_bnt->SetToolTip(wxEmptyString);
|
||||||
|
m_lock_bnt->enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -2472,6 +2472,9 @@ LockButton::LockButton( wxWindow *parent,
|
||||||
|
|
||||||
void LockButton::OnButton(wxCommandEvent& event)
|
void LockButton::OnButton(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
|
if (m_disabled)
|
||||||
|
return;
|
||||||
|
|
||||||
m_is_pushed = !m_is_pushed;
|
m_is_pushed = !m_is_pushed;
|
||||||
enter_button(true);
|
enter_button(true);
|
||||||
|
|
||||||
|
|
|
@ -838,9 +838,13 @@ public:
|
||||||
void OnEnterBtn(wxMouseEvent& event) { enter_button(true); event.Skip(); }
|
void OnEnterBtn(wxMouseEvent& event) { enter_button(true); event.Skip(); }
|
||||||
void OnLeaveBtn(wxMouseEvent& event) { enter_button(false); event.Skip(); }
|
void OnLeaveBtn(wxMouseEvent& event) { enter_button(false); event.Skip(); }
|
||||||
|
|
||||||
bool IsLocked() const { return m_is_pushed; }
|
bool IsLocked() const { return m_is_pushed; }
|
||||||
void SetLock(bool lock);
|
void SetLock(bool lock);
|
||||||
|
|
||||||
|
// create its own Enable/Disable functions to not really disabled button because of tooltip enabling
|
||||||
|
void enable() { m_disabled = false; }
|
||||||
|
void disable() { m_disabled = true; }
|
||||||
|
|
||||||
void msw_rescale();
|
void msw_rescale();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -848,6 +852,7 @@ protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_is_pushed = false;
|
bool m_is_pushed = false;
|
||||||
|
bool m_disabled = false;
|
||||||
|
|
||||||
ScalableBitmap m_bmp_lock_on;
|
ScalableBitmap m_bmp_lock_on;
|
||||||
ScalableBitmap m_bmp_lock_off;
|
ScalableBitmap m_bmp_lock_off;
|
||||||
|
|
Loading…
Add table
Reference in a new issue