mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-12 03:04:51 -04:00
--User changes
-Double clicking on width or height spinner resizes both, but scales to the one double clicked. --Bug fixes -Show grid setting was not being preserved during program run, only on close. -Zooming with the mouse wheel was broken for images whose size is greater than the screen area.
This commit is contained in:
@ -66,6 +66,11 @@ void SpinBox::DoubleClickLowVal(int val)
|
||||
m_DoubleClickLowVal = val;
|
||||
}
|
||||
|
||||
int SpinBox::DoubleClickLowVal()
|
||||
{
|
||||
return m_DoubleClickLowVal;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the value to be used when the user double clicks the spinner while
|
||||
/// it contains zero.
|
||||
@ -76,6 +81,11 @@ void SpinBox::DoubleClickZero(int val)
|
||||
m_DoubleClickZero = val;
|
||||
}
|
||||
|
||||
int SpinBox::DoubleClickZero()
|
||||
{
|
||||
return m_DoubleClickZero;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the value to be used when the user double clicks the spinner while
|
||||
/// it contains a non-zero value.
|
||||
@ -86,6 +96,11 @@ void SpinBox::DoubleClickNonZero(int val)
|
||||
m_DoubleClickNonZero = val;
|
||||
}
|
||||
|
||||
int SpinBox::DoubleClickNonZero()
|
||||
{
|
||||
return m_DoubleClickNonZero;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the small step to be used when the user holds down shift while scrolling.
|
||||
/// The default is step / 10, so use this if something else is needed.
|
||||
@ -175,9 +190,15 @@ bool SpinBox::eventFilter(QObject* o, QEvent* e)
|
||||
(m_Settings->ToggleType() && me->type() == QMouseEvent::MouseButtonRelease && me->button() == Qt::RightButton)))
|
||||
{
|
||||
if (IsClose(m_DoubleClickLowVal, value()))
|
||||
{
|
||||
m_DoubleClickZeroEvent(this, m_DoubleClickZero);
|
||||
setValue(m_DoubleClickZero);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_DoubleClickNonZeroEvent(this, m_DoubleClickNonZero);
|
||||
setValue(m_DoubleClickNonZero);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user