Some little optimisations.

Fri, 06 Apr 2012 13:59:54 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 06 Apr 2012 13:59:54 +0200
changeset 1762
307393ebe9c6
parent 1760
ffa7d2983f0a
child 1763
25a83ac16a5e

Some little optimisations.

Debugger/DebugUI.py file | annotate | diff | comparison | revisions
QScintilla/Editor.py file | annotate | diff | comparison | revisions
UI/UserInterface.py file | annotate | diff | comparison | revisions
--- a/Debugger/DebugUI.py	Fri Apr 06 12:36:09 2012 +0200
+++ b/Debugger/DebugUI.py	Fri Apr 06 13:59:54 2012 +0200
@@ -811,7 +811,7 @@
         if editor is None:
             return
         
-        if editor.isPy2File() or editor.isPy3File() or editor.isRubyFile():
+        if editor.isPy3File() or editor.isPy2File() or editor.isRubyFile():
             if editor.curLineHasBreakpoint():
                 self.dbgEditBpAct.setEnabled(True)
             else:
--- a/QScintilla/Editor.py	Fri Apr 06 12:36:09 2012 +0200
+++ b/QScintilla/Editor.py	Fri Apr 06 13:59:54 2012 +0200
@@ -1946,7 +1946,7 @@
         @param temporary flag indicating a temporary breakpoint (boolean)
         """
         if self.fileName and \
-           (self.isPy2File() or self.isPy3File() or self.isRubyFile()):
+           (self.isPy3File() or self.isPy2File() or self.isRubyFile()):
             self.breakpointModel.addBreakPoint(self.fileName, line,
                 ('', temporary, True, 0))
             self.breakpointToggled.emit(self)
@@ -4170,12 +4170,12 @@
             self.menuActs["Copy"].setEnabled(self.hasSelectedText())
         if not self.isResourcesFile:
             if self.fileName and \
-               (self.isPy2File() or self.isPy3File()):
+               (self.isPy3File() or self.isPy2File()):
                 self.menuActs["Show"].setEnabled(True)
             else:
                 self.menuActs["Show"].setEnabled(False)
             if self.fileName and \
-               (self.isPy2File() or self.isPy3File() or self.isRubyFile()):
+               (self.isPy3File() or self.isPy2File() or self.isRubyFile()):
                 self.menuActs["Diagrams"].setEnabled(True)
             else:
                 self.menuActs["Diagrams"].setEnabled(False)
@@ -4288,7 +4288,7 @@
         Private slot handling the aboutToShow signal of the margins context menu.
         """
         if self.fileName and \
-           (self.isPy2File() or self.isPy3File() or self.isRubyFile()):
+           (self.isPy3File() or self.isPy2File() or self.isRubyFile()):
             self.marginMenuActs["Breakpoint"].setEnabled(True)
             self.marginMenuActs["TempBreakpoint"].setEnabled(True)
             if self.markersAtLine(self.line) & self.breakpointMask:
--- a/UI/UserInterface.py	Fri Apr 06 12:36:09 2012 +0200
+++ b/UI/UserInterface.py	Fri Apr 06 13:59:54 2012 +0200
@@ -5190,8 +5190,8 @@
                     self.utEditorOpen = cap & HasUnittest
                     return
             
-            if self.viewmanager.getOpenEditor(fn).isPy2File() or \
-               self.viewmanager.getOpenEditor(fn).isPy3File():
+            if self.viewmanager.getOpenEditor(fn).isPy3File() or \
+               self.viewmanager.getOpenEditor(fn).isPy2File():
                 self.utScriptAct.setEnabled(True)
                 self.utEditorOpen = True
         
@@ -5216,7 +5216,7 @@
                     self.utEditorOpen = cap & HasUnittest
                     return
             
-            if editor.isPy2File() or editor.isPy3File():
+            if editor.isPy3File() or editor.isPy2File():
                 self.utScriptAct.setEnabled(True)
                 self.utEditorOpen = True
                 return

eric ide

mercurial