--User changes

-Add Ctrl+g shortcut for generating a sequence.

--Bug fixes
 -Fix indendation for variations because of type icon.
 -Fix bug when duplicating flame where the new flame wasn't being properly selected.
 -Fix bug where clearing a flame was changing size and quality when it shouldn't have.
 -Fix bug where reading an Xml palette was failing on linux.

--Code changes
 -No longer pad string with null terminator in ReadFile() because std::string already does it.
This commit is contained in:
Person
2024-05-08 07:31:55 -06:00
parent 45d936b60c
commit 4c0f03a52a
10 changed files with 58 additions and 33 deletions

View File

@ -392,6 +392,7 @@ bool Fractorium::eventFilter(QObject* o, QEvent* e)
static int commacount = 0;
static int periodcount = 0;
static int lcount = 0;
static int ctrlgcount = 0;
const bool shift = QGuiApplication::keyboardModifiers().testFlag(Qt::ShiftModifier);
const bool ctrl = QGuiApplication::keyboardModifiers().testFlag(Qt::ControlModifier);
@ -448,11 +449,22 @@ bool Fractorium::eventFilter(QObject* o, QEvent* e)
const auto focusedctrlDblSpin = dynamic_cast<QDoubleSpinBox*>(this->focusWidget());
const auto focusedctrlCombo = dynamic_cast<QComboBox*>(this->focusWidget());
if (!focusedctrlEdit &&
!focusedctrlSpin &&
!focusedctrlDblSpin &&
!focusedctrlCombo &&
!QGuiApplication::keyboardModifiers().testFlag(Qt::AltModifier))//Must exclude these because otherwise, typing a minus key in any of the spinners will switch the xform. Also exclude alt.
if (ctrl && (ke->key() == Qt::Key_G))
{
ctrlgcount++;
if (ctrlgcount >= ftimes)
{
OnSequenceGenerateButtonClicked(true);
ctrlgcount = 0;
return true;
}
}
else if (!focusedctrlEdit &&
!focusedctrlSpin &&
!focusedctrlDblSpin &&
!focusedctrlCombo &&
!QGuiApplication::keyboardModifiers().testFlag(Qt::AltModifier))//Must exclude these because otherwise, typing a minus key in any of the spinners will switch the xform. Also exclude alt.
{
size_t index = 0;
double vdist = 0.01;