Commit d88747a2 authored by Jan Möbius's avatar Jan Möbius

Fixed action mode toggling via meta or alt keys

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15412 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 8b71ae53
......@@ -555,14 +555,29 @@ void CoreWidget::coreKeyPressEvent (QKeyEvent* _e){
if ( ( _e->key() == Qt::Key_Meta ) && OpenFlipper::Options::isLinux() ) {
if ( _e->type() == QEvent::KeyPress ) {
setActionMode( Viewer::ExamineMode );
if ( lastActionMode() == actionMode()) {
if (actionMode() == Viewer::PickingMode)
setActionMode( Viewer::ExamineMode );
else
setActionMode( Viewer::PickingMode );
} else
setActionMode( lastActionMode() );
}
}
if ( ( _e->key() == Qt::Key_Alt ) && ! OpenFlipper::Options::isLinux() ) {
if ( _e->type() == QEvent::KeyPress ) {
//emit log(LOGERR,"Switch to examine mode");
setActionMode( Viewer::ExamineMode );
if ( lastActionMode() == actionMode()) {
if (actionMode() == Viewer::PickingMode)
setActionMode( Viewer::ExamineMode );
else
setActionMode( Viewer::PickingMode );
} else
setActionMode( lastActionMode() );
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment