Fixed move action shortcuts

This commit is contained in:
Stefan Malewski 2020-11-05 22:30:42 -03:00 committed by Luis Ángel San Martín
parent c73f28cca1
commit 08ce8c3c65

View File

@ -652,20 +652,20 @@ void Viewer::keyPressEvent(QKeyEvent *event)
QAbstractScrollArea::keyPressEvent(event);
}
void Viewer::moveAction(QKeySequence key)
void Viewer::moveAction(QKeySequence *key)
{
int _key = 0;
if (key == ShortcutsManager::getShortcutsManager().getShortcut(MOVE_DOWN_ACTION_Y))
if (*key == ShortcutsManager::getShortcutsManager().getShortcut(MOVE_DOWN_ACTION_Y))
_key = Qt::Key_Down;
else if (key == ShortcutsManager::getShortcutsManager().getShortcut(MOVE_UP_ACTION_Y))
else if (*key == ShortcutsManager::getShortcutsManager().getShortcut(MOVE_UP_ACTION_Y))
_key = Qt::Key_Up;
else if (key == ShortcutsManager::getShortcutsManager().getShortcut(MOVE_LEFT_ACTION_Y))
else if (*key == ShortcutsManager::getShortcutsManager().getShortcut(MOVE_LEFT_ACTION_Y))
_key = Qt::Key_Left;
else if (key == ShortcutsManager::getShortcutsManager().getShortcut(MOVE_RIGHT_ACTION_Y))
else if (*key == ShortcutsManager::getShortcutsManager().getShortcut(MOVE_RIGHT_ACTION_Y))
_key = Qt::Key_Right;
QKeyEvent _event = QKeyEvent(QEvent::KeyPress, _key, Qt::NoModifier);