--Bug fixes

-Add support for Chaotica files which specify xform weight as "Base weight" instead of "base_weight".
 -Fix bug where Fractorium would crash when a new file was dragged in while previews were still rendering.
  --This was done by changing the TreeItemChanged() events in the library tab use a direct connection rather than a queued connection.
  --This obviated the need for QCoreApplication::processEvents() calls in the library tree code.
 -Fix bug where renaming a flame within a file, then tabbing away did not commit the name change.

--Code changes
 -Clean up some warnings about const variables in the latest version of Visual Studio 2019.
 -Upgrade installer to latest update of Visual Studio 2019.
This commit is contained in:
Person
2020-07-14 17:45:07 -07:00
parent a07955d12e
commit c0a1395a2b
5 changed files with 91 additions and 85 deletions

View File

@ -382,8 +382,8 @@ bool Fractorium::eventFilter(QObject* o, QEvent* e)
{
auto combo = ui.CurrentXformCombo;
bool shift = QGuiApplication::keyboardModifiers().testFlag(Qt::ShiftModifier);
int times = 3;
int ftimes = 2;
const int times = 3;
const int ftimes = 2;
if (ke->key() >= Qt::Key_F1 && ke->key() <= Qt::Key_F32)
{
@ -391,7 +391,7 @@ bool Fractorium::eventFilter(QObject* o, QEvent* e)
if (fcount >= ftimes)
{
int val = ke->key() - (int)Qt::Key_F1;
const int val = ke->key() - (int)Qt::Key_F1;
if (val < combo->count())
combo->setCurrentIndex(val);
@ -417,10 +417,10 @@ bool Fractorium::eventFilter(QObject* o, QEvent* e)
}
else if (o == this)
{
auto focusedctrlEdit = dynamic_cast<QLineEdit*>(this->focusWidget());
auto focusedctrlSpin = dynamic_cast<QSpinBox*>(this->focusWidget());
auto focusedctrlDblSpin = dynamic_cast<QDoubleSpinBox*>(this->focusWidget());
auto focusedctrlCombo = dynamic_cast<QComboBox*>(this->focusWidget());
const auto focusedctrlEdit = dynamic_cast<QLineEdit*>(this->focusWidget());
const auto focusedctrlSpin = dynamic_cast<QSpinBox*>(this->focusWidget());
const auto focusedctrlDblSpin = dynamic_cast<QDoubleSpinBox*>(this->focusWidget());
const auto focusedctrlCombo = dynamic_cast<QComboBox*>(this->focusWidget());
if (!focusedctrlEdit &&
!focusedctrlSpin &&
@ -434,11 +434,11 @@ bool Fractorium::eventFilter(QObject* o, QEvent* e)
double zoom = 1;
double rot = 1;
double grow = 0.01;
bool shift = QGuiApplication::keyboardModifiers().testFlag(Qt::ShiftModifier);
bool ctrl = QGuiApplication::keyboardModifiers().testFlag(Qt::ControlModifier);
const bool shift = QGuiApplication::keyboardModifiers().testFlag(Qt::ShiftModifier);
const bool ctrl = QGuiApplication::keyboardModifiers().testFlag(Qt::ControlModifier);
bool pre = true;
if (auto r = m_Controller->Renderer())
if (const auto r = m_Controller->Renderer())
{
hdist = std::abs(r->UpperRightX() - r->LowerLeftX()) * 0.01 * m_Controller->AffineScaleLockedToCurrent();
vdist = std::abs(r->UpperRightY() - r->LowerLeftY()) * 0.01 * m_Controller->AffineScaleLockedToCurrent();