diff --git a/GeoModelVisualization/VP1GeometrySystems/src/VP1GeometrySystem.cxx b/GeoModelVisualization/VP1GeometrySystems/src/VP1GeometrySystem.cxx index c78289deb5a3738276165b4db703785260c5f80a..c09b8affd937f7e40b50b175eb6e773cb5cf3c30 100644 --- a/GeoModelVisualization/VP1GeometrySystems/src/VP1GeometrySystem.cxx +++ b/GeoModelVisualization/VP1GeometrySystems/src/VP1GeometrySystem.cxx @@ -761,10 +761,18 @@ void VP1GeometrySystem::userPickedNode(SoNode* , SoPath *pickedPath) //of the inventor and Qt way bool shift_isdown = (Qt::ShiftModifier & QApplication::keyboardModifiers()); -// || ( m_d->kbEvent && (SO_KEY_PRESS_EVENT(m_d->kbEvent, SoKeyboardEvent::LEFT_SHIFT)|| -// SO_KEY_PRESS_EVENT(m_d->kbEvent, SoKeyboardEvent::RIGHT_SHIFT)) ) ); + bool ctrl_isdown = (Qt::ControlModifier & QApplication::keyboardModifiers()); + bool alt_isdown = (Qt::AltModifier & QApplication::keyboardModifiers()); - if (shift_isdown) { + if (ctrl_isdown && shift_isdown) { + //Volume should be put in ZAPPED state. + deselectAll(); + volhandle->setState(VP1GeoFlags::ZAPPED); + message("===> Zapping Node: "+volhandle->getName()); + return; + } + + else if (shift_isdown) { //Parent of volume should be put in CONTRACTED state. deselectAll(); @@ -774,11 +782,8 @@ void VP1GeometrySystem::userPickedNode(SoNode* , SoPath *pickedPath) return; } - bool ctrl_isdown = (Qt::ControlModifier & QApplication::keyboardModifiers()); -// || ( m_d->kbEvent && (SO_KEY_PRESS_EVENT(m_d->kbEvent, SoKeyboardEvent::LEFT_CONTROL)|| -// SO_KEY_PRESS_EVENT(m_d->kbEvent, SoKeyboardEvent::RIGHT_CONTROL)) ) ); - if (ctrl_isdown) { + else if (ctrl_isdown) { //Volume should be put in EXPANDED state if it has children. deselectAll(); if (volhandle->nChildren()>0) { @@ -788,17 +793,8 @@ void VP1GeometrySystem::userPickedNode(SoNode* , SoPath *pickedPath) return; } - bool z_isdown = m_d->kbEvent && SO_KEY_PRESS_EVENT(m_d->kbEvent,SoKeyboardEvent::Z); - if (z_isdown) { - //Volume should be put in ZAPPED state. - deselectAll(); - volhandle->setState(VP1GeoFlags::ZAPPED); - message("===> Zapping Node: "+volhandle->getName()); - return; - } - bool s_isdown = m_d->kbEvent && SO_KEY_PRESS_EVENT(m_d->kbEvent,SoKeyboardEvent::S); - if (s_isdown) { + else if (alt_isdown) { deselectAll(); #ifdef __APPLE__ char buffer[1024]; diff --git a/GeoModelVisualization/VP1GeometrySystems/src/geometrysystemcontroller.ui b/GeoModelVisualization/VP1GeometrySystems/src/geometrysystemcontroller.ui index fd90e46fae4dd871cb3fbfaabb4164f4c51d87a7..b57440e532b5a859f9c8fab54228295222e79f91 100644 --- a/GeoModelVisualization/VP1GeometrySystems/src/geometrysystemcontroller.ui +++ b/GeoModelVisualization/VP1GeometrySystems/src/geometrysystemcontroller.ui @@ -224,7 +224,7 @@ <item> <widget class="QLabel" name="label_11"> <property name="text"> - <string>'z' + click: Iconify the volume</string> + <string>'Crtl/Cmd' + 'Shift' + click: Iconify the volume</string> </property> </widget> </item> @@ -245,7 +245,7 @@ <item> <widget class="QLabel" name="label_16"> <property name="text"> - <string>'s' + click: Write volume</string> + <string>'Alt' + click: Write volume</string> </property> </widget> </item>