Changeset 11672:abbe39492734 in orange


Ignore:
Timestamp:
06/10/13 14:12:47 (11 months ago)
Author:
Martin Frlin <martin.frlin@…>
Branch:
default
Message:

Repositioned undo/redo buttons and added shortcuts.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeWidgets/Data/OWPaintData.py

    r11570 r11672  
    723723        self.classVariable = orange.EnumVariable("Class label", values=["Class 1", "Class 2"], baseValue=0) 
    724724 
    725         ur = OWGUI.widgetBox(self.controlArea, "Undo / Redo") 
    726         undo = QAction("Undo", self) 
    727         undo.pyqtConfigure(toolTip="Undo action") 
    728         self.connect(undo, SIGNAL("triggered()"), self.undoAction) 
    729  
    730         redo = QAction("Redo", self) 
    731         redo.pyqtConfigure(toolTip="Redo action") 
    732         self.connect(redo, SIGNAL("triggered()"), self.redoAction) 
    733  
    734         actionsWidget =  ModelActionsWidget([undo, redo], self) 
    735         actionsWidget.layout().addStretch(10) 
    736         actionsWidget.layout().setSpacing(1) 
    737  
    738         ur.layout().addWidget(actionsWidget) 
    739  
    740725        w = OWGUI.widgetBox(self.controlArea, "Class Label") 
    741726         
     
    794779        self.toolsStackCache = {} 
    795780        optionsbox = OWGUI.widgetBox(self.controlArea, "Options", orientation=self.optionsLayout) 
    796          
    797 #        OWGUI.checkBox(self.controlArea, self, "addClassAsMeta", "Add class ids as meta attributes") 
     781 
     782 
     783        ur = OWGUI.widgetBox(self.controlArea, "") 
     784        undo = QAction("Undo", self) 
     785        undo.pyqtConfigure(toolTip="Undo action") 
     786        undo.setShortcut("Ctrl+Z") 
     787        self.connect(undo, SIGNAL("triggered()"), self.undoAction) 
     788 
     789        redo = QAction("Redo", self) 
     790        redo.pyqtConfigure(toolTip="Redo action") 
     791        redo.setShortcut("Ctrl+Shift+Z") 
     792        self.connect(redo, SIGNAL("triggered()"), self.redoAction) 
     793 
     794        actionsWidget =  ModelActionsWidget([undo, redo], self) 
     795        actionsWidget.layout().addStretch(10) 
     796        actionsWidget.layout().setSpacing(1) 
     797 
     798        ur.layout().addWidget(actionsWidget) 
     799 
    798800        OWGUI.rubber(self.controlArea) 
    799801        box = OWGUI.widgetBox(self.controlArea, "Commit") 
  • source/orangeqt/setup.py

    r10858 r11672  
    9797        try: 
    9898            sipdistutils.build_ext.run(self) 
    99         except Exception, ex: 
     99        except Exception as ex: 
    100100            if self.required: 
    101101                raise 
Note: See TracChangeset for help on using the changeset viewer.