mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-02-01 18:40:12 -05:00
--User changes
-Add new keyboard shortcuts: --P/Shift+P toggles visibility of pre/post xforms. --L/Shift+L toggles visibility of all/selected pre/post xforms. --Bug fixes -Xforms were erroneously able to edit via key pressed when not shown.
This commit is contained in:
parent
47541e4551
commit
c1d336b693
@ -368,6 +368,8 @@ bool Fractorium::eventFilter(QObject* o, QEvent* e)
|
|||||||
static int ecount = 0;
|
static int ecount = 0;
|
||||||
static int gcount = 0;
|
static int gcount = 0;
|
||||||
static int hcount = 0;
|
static int hcount = 0;
|
||||||
|
static int pcount = 0;
|
||||||
|
static int lcount = 0;
|
||||||
|
|
||||||
if (o == ui.GLParentScrollArea && e->type() == QEvent::Resize)
|
if (o == ui.GLParentScrollArea && e->type() == QEvent::Resize)
|
||||||
{
|
{
|
||||||
@ -487,7 +489,42 @@ bool Fractorium::eventFilter(QObject* o, QEvent* e)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (!DrawXforms())//Everything below this must be for editing xforms via key press.
|
else if (ke->key() == Qt::Key_P)
|
||||||
|
{
|
||||||
|
pcount++;
|
||||||
|
|
||||||
|
if (pcount >= times)
|
||||||
|
{
|
||||||
|
pcount = 0;
|
||||||
|
|
||||||
|
if (!shift)
|
||||||
|
ui.ActionDrawPreAffines->setChecked(!ui.ActionDrawPreAffines->isChecked());
|
||||||
|
else
|
||||||
|
ui.ActionDrawPostAffines->setChecked(!ui.ActionDrawPostAffines->isChecked());
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (ke->key() == Qt::Key_L)
|
||||||
|
{
|
||||||
|
lcount++;
|
||||||
|
|
||||||
|
if (lcount >= times)
|
||||||
|
{
|
||||||
|
lcount = 0;
|
||||||
|
|
||||||
|
if (!shift)
|
||||||
|
{
|
||||||
|
if (DrawPreAffines())
|
||||||
|
ui.ActionDrawAllPreAffines->setChecked(!ui.ActionDrawAllPreAffines->isChecked());
|
||||||
|
}
|
||||||
|
else if (DrawPostAffines())
|
||||||
|
ui.ActionDrawAllPostAffines->setChecked(!ui.ActionDrawAllPostAffines->isChecked());
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if ((!DrawPreAffines() && pre) || (!DrawPostAffines() && !pre))//Everything below this must be for editing xforms via key press.
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user