mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-02 22:34:52 -04:00
--User changes
-Draw selection circles around all selected xforms plus the current one. --Bug fixes -Add control key as a modifier to increase the amount a spinbox is changed when using right mouse drag to edit. Previously only observed shift key to decrease the value. -Change the copy/paste selected xforms shortcuts to be Ctrl+X+C and Ctrl+X+V. --Code changes -Add function Fractorium::IsXformSelected() to determine if an xform has been selected with the checkboxes.
This commit is contained in:
@ -24,6 +24,19 @@ void Fractorium::OnXformsSelectAllButtonClicked(bool checked) { ForEachXformChec
|
||||
/// <param name="checked">Ignored</param>
|
||||
void Fractorium::OnXformsSelectNoneButtonClicked(bool checked) { ForEachXformCheckbox([&](int i, QCheckBox * w) { w->setChecked(false); }); }
|
||||
|
||||
/// <summary>
|
||||
/// Return whether the checkbox at the specified index is checked.
|
||||
/// </summary>
|
||||
/// <param name="checked">True if checked, else false.</param>
|
||||
bool Fractorium::IsXformSelected(size_t i)
|
||||
{
|
||||
if (auto child = m_XformsSelectionLayout->itemAt(int(i)))
|
||||
if (auto w = qobject_cast<QCheckBox*>(child->widget()))
|
||||
return w->isChecked();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear all of the dynamically created xform checkboxes.
|
||||
/// </summary>
|
||||
@ -35,7 +48,7 @@ void Fractorium::ClearXformsSelections()
|
||||
|
||||
while (m_XformsSelectionLayout->count() && (child = m_XformsSelectionLayout->takeAt(0)))
|
||||
{
|
||||
auto* w = child->widget();
|
||||
auto w = child->widget();
|
||||
delete child;
|
||||
delete w;
|
||||
}
|
||||
@ -75,10 +88,8 @@ void Fractorium::ForEachXformCheckbox(std::function<void(int, QCheckBox*)> func)
|
||||
|
||||
while (QLayoutItem* child = m_XformsSelectionLayout->itemAt(i))
|
||||
{
|
||||
if (auto* w = qobject_cast<QCheckBox*>(child->widget()))
|
||||
{
|
||||
if (auto w = qobject_cast<QCheckBox*>(child->widget()))
|
||||
func(i, w);
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user