Allow slowing down Animations::Simple in debug build.

This commit is contained in:
John Preston 2022-01-11 17:12:41 +03:00
parent e032dbf383
commit db453ab7ae
1 changed files with 11 additions and 2 deletions

View File

@ -630,11 +630,20 @@ bool MainWindow::eventFilter(QObject *object, QEvent *e) {
switch (e->type()) {
case QEvent::KeyPress: {
if (Logs::DebugEnabled()
&& (e->type() == QEvent::KeyPress)
&& object == windowHandle()) {
auto key = static_cast<QKeyEvent*>(e)->key();
const auto key = static_cast<QKeyEvent*>(e)->key();
FeedLangTestingKey(key);
}
#ifdef _DEBUG
switch (static_cast<QKeyEvent*>(e)->key()) {
case Qt::Key_F3:
anim::SetSlowMultiplier((anim::SlowMultiplier() == 10) ? 1 : 10);
return true;
case Qt::Key_F4:
anim::SetSlowMultiplier((anim::SlowMultiplier() == 50) ? 1 : 50);
return true;
}
#endif
} break;
case QEvent::MouseMove: {