Commit f8362bf7 authored by Mike Kremer's avatar Mike Kremer

Adapted key registration in order to neglect ctrl + shift (simultaneously pressed).

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11579 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 797cc812
......@@ -134,9 +134,9 @@ void MovePlugin::pluginsInitialized() {
//KEYS
emit registerKey (Qt::Key_Shift, Qt::ShiftModifier, tr("Manipulator rotation"), true);
emit registerKey (Qt::Key_Shift, Qt::NoModifier, tr("Manipulator rotation"), true);
emit registerKey (Qt::Key_Shift, Qt::ControlModifier | Qt::ShiftModifier, tr("Manipulator rotation"), true);
emit registerKey (Qt::Key_Control, Qt::ControlModifier, tr("Resize"), true);
emit registerKey (Qt::Key_Control, Qt::NoModifier, tr("Resize"), true);
emit registerKey (Qt::Key_Control, Qt::ShiftModifier| Qt::ControlModifier, tr("Resize"), true);
//SCRIPTING SLOT DESCRIPTIONS
setDescriptions();
......@@ -371,10 +371,17 @@ void MovePlugin::slotMouseEvent(QMouseEvent* _event) {
void MovePlugin::slotKeyEvent (QKeyEvent* _event)
{
if (_event->key() == Qt::Key_Control)
if ((_event->key() == Qt::Key_Control) && _event->modifiers() != Qt::ShiftModifier) {
setManipMode (QtTranslationManipulatorNode::Resize);
else if (_event->key () == Qt::Key_Shift)
return;
} else if ((_event->key () == Qt::Key_Shift) && _event->modifiers() != Qt::ControlModifier) {
setManipMode (QtTranslationManipulatorNode::LocalRotation);
return;
}
// Return to normal mode if Ctrl + Shift is pressed since this
// is used in translation manipulator node for rotation rasterization
setManipMode (QtTranslationManipulatorNode::TranslationRotation);
}
//------------------------------------------------------------------------------
......
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