Code

Better handling of shortcuts in 3D box tool
authorcilix42 <cilix42@users.sourceforge.net>
Fri, 11 Jan 2008 22:55:37 +0000 (22:55 +0000)
committercilix42 <cilix42@users.sourceforge.net>
Fri, 11 Jan 2008 22:55:37 +0000 (22:55 +0000)
src/box3d-context.cpp

index bbc8097f5957a4dd6cf0286e2a0b3447fb015b90..6450fa6d40a7a01a392f49d7668e1f149ac430ac 100644 (file)
@@ -574,35 +574,35 @@ static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEven
             break;
 
         case GDK_x:
+        case GDK_X:
             if (MOD__ALT_ONLY) {
                 desktop->setToolboxFocusTo ("altx-box3d");
                 ret = TRUE;
             }
-            break;
-        case GDK_X:
-            if (MOD__CTRL) break; // Don't catch Ctrl+X ('cut') and Ctrl+Shift+X ('open XML editor')
-            persp3d_toggle_VPs(persp3d_currently_selected_persps(event_context), Proj::X);
-            bc->_vpdrag->updateLines(); // FIXME: Shouldn't this be done automatically?
-            ret = true;
+            if (MOD__SHIFT_ONLY) {
+                persp3d_toggle_VPs(persp3d_currently_selected_persps(event_context), Proj::X);
+                bc->_vpdrag->updateLines(); // FIXME: Shouldn't this be done automatically?
+                ret = true;
+            }
             break;
 
+        case GDK_y:
         case GDK_Y:
-        {
-            if (MOD__CTRL) break; // Don't catch Ctrl+Y ("redo")
-            persp3d_toggle_VPs(persp3d_currently_selected_persps(event_context), Proj::Y);
-            bc->_vpdrag->updateLines(); // FIXME: Shouldn't this be done automatically?
-            ret = true;
+            if (MOD__SHIFT_ONLY) {
+                persp3d_toggle_VPs(persp3d_currently_selected_persps(event_context), Proj::Y);
+                bc->_vpdrag->updateLines(); // FIXME: Shouldn't this be done automatically?
+                ret = true;
+            }
             break;
-        }
 
+        case GDK_z:
         case GDK_Z:
-        {
-            if (MOD__CTRL) break; // Don't catch Ctrl+Z ("undo")
-            persp3d_toggle_VPs(persp3d_currently_selected_persps(event_context), Proj::Z);
-            bc->_vpdrag->updateLines(); // FIXME: Shouldn't this be done automatically?
-            ret = true;
+            if (MOD__SHIFT_ONLY) {
+                persp3d_toggle_VPs(persp3d_currently_selected_persps(event_context), Proj::Z);
+                bc->_vpdrag->updateLines(); // FIXME: Shouldn't this be done automatically?
+                ret = true;
+            }
             break;
-        }
 
         case GDK_Escape:
             sp_desktop_selection(desktop)->clear();