--User changes

-Add a button to swap the pre and post affine values for all selected xforms.

--Bug fixes
 -Remove the ability to change spinner values with +=-=, it was conflicting with other things and added no real value.
 -All file dialog opening in Linux would freeze. No longer using native file dialogs, they are broken.
 -Set default open path to the desktop if there is no settings file present, which will be the case on the first run.
 -Amphibole_Supergroup.ugr palette had an invalid character in two of the palette names.

--Code changes
 -Change some table header padding styles to work with new Qt. Qss reload is required.
 -Ensure the open folder path setting always has a valid string in it before opening a folder.
This commit is contained in:
Person
2018-09-30 14:20:02 -07:00
parent 02c3c3967b
commit c91866acc3
30 changed files with 237 additions and 93 deletions

View File

@ -95,6 +95,7 @@ void Fractorium::InitXformsAffineUI()
connect(ui.PostRandomButton, SIGNAL(clicked(bool)), this, SLOT(OnRandomAffineButtonClicked(bool)), Qt::QueuedConnection);
connect(ui.PreAffineGroupBox, SIGNAL(toggled(bool)), this, SLOT(OnAffineGroupBoxToggled(bool)), Qt::QueuedConnection);
connect(ui.PostAffineGroupBox, SIGNAL(toggled(bool)), this, SLOT(OnAffineGroupBoxToggled(bool)), Qt::QueuedConnection);
connect(ui.SwapAffinesButton, SIGNAL(clicked(bool)), this, SLOT(OnSwapAffinesButtonClicked(bool)), Qt::QueuedConnection);
connect(ui.ShowPreAffineAllRadio, SIGNAL(toggled(bool)), this, SLOT(OnAffineDrawAllCurrentRadioButtonToggled(bool)), Qt::QueuedConnection);
connect(ui.ShowPreAffineCurrentRadio, SIGNAL(toggled(bool)), this, SLOT(OnAffineDrawAllCurrentRadioButtonToggled(bool)), Qt::QueuedConnection);
connect(ui.ShowPreAffineSelectedRadio, SIGNAL(toggled(bool)), this, SLOT(OnAffineDrawAllCurrentRadioButtonToggled(bool)), Qt::QueuedConnection);
@ -704,6 +705,27 @@ void Fractorium::OnAffineGroupBoxToggled(bool on)
ui.GLDisplay->update();
}
/// <summary>
/// Swap the values of the pre and post affines for the selected xforms.
/// </summary>
template <typename T>
void FractoriumEmberController<T>::SwapAffines()
{
UpdateXform([&](Xform<T>* xform, size_t xfindex, size_t selIndex)
{
auto pre = xform->m_Affine;
auto post = xform->m_Post;
xform->m_Affine = post;
xform->m_Post = pre;
}, eXformUpdate::UPDATE_SELECTED);
FillBothAffines();
}
void Fractorium::OnSwapAffinesButtonClicked(bool checked)
{
m_Controller->SwapAffines();
}
/// <summary>
/// Trigger a redraw which will show all, or only the current, circle affine transforms
/// based on which radio buttons are selected.