--Bug fixes

-Fix more bugs with keyboard shortcuts.
This commit is contained in:
Person 2020-01-31 16:21:23 -08:00
parent c1d336b693
commit 541185df8c
2 changed files with 41 additions and 22 deletions

View File

@ -490,6 +490,8 @@ bool Fractorium::eventFilter(QObject* o, QEvent* e)
return true; return true;
} }
else if (ke->key() == Qt::Key_P) else if (ke->key() == Qt::Key_P)
{
if (!ctrl)
{ {
pcount++; pcount++;
@ -498,14 +500,23 @@ bool Fractorium::eventFilter(QObject* o, QEvent* e)
pcount = 0; pcount = 0;
if (!shift) if (!shift)
{
ui.ActionDrawPreAffines->setChecked(!ui.ActionDrawPreAffines->isChecked()); ui.ActionDrawPreAffines->setChecked(!ui.ActionDrawPreAffines->isChecked());
OnActionDrawAffines(ui.ActionDrawPreAffines->isChecked());
}
else else
{
ui.ActionDrawPostAffines->setChecked(!ui.ActionDrawPostAffines->isChecked()); ui.ActionDrawPostAffines->setChecked(!ui.ActionDrawPostAffines->isChecked());
OnActionDrawAffines(ui.ActionDrawPostAffines->isChecked());
}
} }
return true; return true;
} }
}
else if (ke->key() == Qt::Key_L) else if (ke->key() == Qt::Key_L)
{
if (!ctrl)
{ {
lcount++; lcount++;
@ -516,14 +527,21 @@ bool Fractorium::eventFilter(QObject* o, QEvent* e)
if (!shift) if (!shift)
{ {
if (DrawPreAffines()) if (DrawPreAffines())
{
ui.ActionDrawAllPreAffines->setChecked(!ui.ActionDrawAllPreAffines->isChecked()); ui.ActionDrawAllPreAffines->setChecked(!ui.ActionDrawAllPreAffines->isChecked());
OnActionDrawAllAffines(ui.ActionDrawAllPreAffines->isChecked());
}
} }
else if (DrawPostAffines()) else if (DrawPostAffines())
{
ui.ActionDrawAllPostAffines->setChecked(!ui.ActionDrawAllPostAffines->isChecked()); ui.ActionDrawAllPostAffines->setChecked(!ui.ActionDrawAllPostAffines->isChecked());
OnActionDrawAllAffines(ui.ActionDrawAllPostAffines->isChecked());
}
} }
return true; return true;
} }
}
else if ((!DrawPreAffines() && pre) || (!DrawPostAffines() && !pre))//Everything below this must be for editing xforms via key press. else if ((!DrawPreAffines() && pre) || (!DrawPostAffines() && !pre))//Everything below this must be for editing xforms via key press.
{ {
return true; return true;

View File

@ -768,6 +768,7 @@ void Fractorium::OnActionAlternateEditorImage(bool checked)
{ {
if (DrawPreAffines() || DrawPostAffines()) if (DrawPreAffines() || DrawPostAffines())
{ {
SaveAffineState();
ui.ActionDrawPreAffines->setChecked(false); ui.ActionDrawPreAffines->setChecked(false);
ui.ActionDrawAllPreAffines->setChecked(false); ui.ActionDrawAllPreAffines->setChecked(false);
ui.ActionDrawPostAffines->setChecked(false); ui.ActionDrawPostAffines->setChecked(false);