Martin Frlin avatar Martin Frlin committed abbe394

Repositioned undo/redo buttons and added shortcuts.

Comments (0)

Files changed (2)

Orange/OrangeWidgets/Data/OWPaintData.py

 
         self.classVariable = orange.EnumVariable("Class label", values=["Class 1", "Class 2"], baseValue=0)
 
-        ur = OWGUI.widgetBox(self.controlArea, "Undo / Redo")
-        undo = QAction("Undo", self)
-        undo.pyqtConfigure(toolTip="Undo action")
-        self.connect(undo, SIGNAL("triggered()"), self.undoAction)
-
-        redo = QAction("Redo", self)
-        redo.pyqtConfigure(toolTip="Redo action")
-        self.connect(redo, SIGNAL("triggered()"), self.redoAction)
-
-        actionsWidget =  ModelActionsWidget([undo, redo], self)
-        actionsWidget.layout().addStretch(10)
-        actionsWidget.layout().setSpacing(1)
-
-        ur.layout().addWidget(actionsWidget)
-
         w = OWGUI.widgetBox(self.controlArea, "Class Label")
         
         self.classValuesView = listView = QListView()
         self.optionsLayout = QStackedLayout()
         self.toolsStackCache = {}
         optionsbox = OWGUI.widgetBox(self.controlArea, "Options", orientation=self.optionsLayout)
-        
-#        OWGUI.checkBox(self.controlArea, self, "addClassAsMeta", "Add class ids as meta attributes")
+
+
+        ur = OWGUI.widgetBox(self.controlArea, "")
+        undo = QAction("Undo", self)
+        undo.pyqtConfigure(toolTip="Undo action")
+        undo.setShortcut("Ctrl+Z")
+        self.connect(undo, SIGNAL("triggered()"), self.undoAction)
+
+        redo = QAction("Redo", self)
+        redo.pyqtConfigure(toolTip="Redo action")
+        redo.setShortcut("Ctrl+Shift+Z")
+        self.connect(redo, SIGNAL("triggered()"), self.redoAction)
+
+        actionsWidget =  ModelActionsWidget([undo, redo], self)
+        actionsWidget.layout().addStretch(10)
+        actionsWidget.layout().setSpacing(1)
+
+        ur.layout().addWidget(actionsWidget)
+
         OWGUI.rubber(self.controlArea)
         box = OWGUI.widgetBox(self.controlArea, "Commit")
         

source/orangeqt/setup.py

     def run(self):
         try:
             sipdistutils.build_ext.run(self)
-        except Exception, ex:
+        except Exception as ex:
             if self.required:
                 raise
             else:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.