Made the quick search backward work the same way forward does.

Tue, 21 Jun 2011 18:38:38 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 21 Jun 2011 18:38:38 +0200
changeset 1134
9185e9dd52ef
parent 1133
564b52bf5ea7
child 1136
d1292f521624

Made the quick search backward work the same way forward does.

ViewManager/ViewManager.py file | annotate | diff | comparison | revisions
diff -r 564b52bf5ea7 -r 9185e9dd52ef ViewManager/ViewManager.py
--- a/ViewManager/ViewManager.py	Mon Jun 20 15:11:30 2011 +0200
+++ b/ViewManager/ViewManager.py	Tue Jun 21 18:38:38 2011 +0200
@@ -3980,7 +3980,26 @@
         """
         Private slot to handle the quickFindPrev toolbutton action.
         """
-        self.__quickSearchInEditor(True, True)
+        # first we have to check if quick search is active
+        # and try to activate it if not
+        if self.__quickSearchToolbarVisibility is None:
+            self.__quickSearchToolbarVisibility = self.__quickSearchToolbar.isVisible()
+        if not self.__quickSearchToolbar.isVisible():
+            self.__quickSearchToolbar.show()
+        if not self.quickFindtextCombo.lineEdit().hasFocus():
+            aw = self.activeWindow()
+            self.quickFindtextCombo.lastActive = aw
+            if aw:
+                self.quickFindtextCombo.lastCursorPos = aw.getCursorPosition()
+            else:
+                self.quickFindtextCombo.lastCursorPos = None
+            tff = self.textForFind(False)
+            if tff:
+                self.quickFindtextCombo.lineEdit().setText(tff)
+            self.quickFindtextCombo.lineEdit().setFocus()
+            self.quickFindtextCombo.lineEdit().selectAll()
+        else:
+            self.__quickSearchInEditor(True, True)
         
     def __quickSearchMarkOccurrences(self, txt):
         """

eric ide

mercurial