Fixed an issue causing the 'Selection only' entry to remain selectable in the Find and Find&Replace widget for a rectangular selection. 5_3_x

Wed, 08 May 2013 18:34:20 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 08 May 2013 18:34:20 +0200
branch
5_3_x
changeset 2651
93439c60fe45
parent 2649
3e42ab1cd03b
child 2652
894f162dd635

Fixed an issue causing the 'Selection only' entry to remain selectable in the Find and Find&Replace widget for a rectangular selection.
(grafted from 1b495c651868100b82c3d332561bfe14054465e1)

QScintilla/QsciScintillaCompat.py file | annotate | diff | comparison | revisions
QScintilla/SearchReplaceWidget.py file | annotate | diff | comparison | revisions
--- a/QScintilla/QsciScintillaCompat.py	Mon May 06 19:58:43 2013 +0200
+++ b/QScintilla/QsciScintillaCompat.py	Wed May 08 18:34:20 2013 +0200
@@ -471,6 +471,10 @@
         """
         self.SendScintilla(QsciScintilla.SCI_LINEENDEXTEND)
     
+        startLine, startIndex, endLine, endIndex = self.getSelection()
+        return startLine != -1 and \
+               startLine != endLine and \
+               self.SendScintilla(QsciScintilla.SCI_SELECTIONISRECTANGLE)
     def getLineSeparator(self):
         """
         Public method to get the line separator for the current eol mode.
--- a/QScintilla/SearchReplaceWidget.py	Mon May 06 19:58:43 2013 +0200
+++ b/QScintilla/SearchReplaceWidget.py	Wed May 08 18:34:20 2013 +0200
@@ -449,7 +449,7 @@
         @param editor reference to the editor (Editor)
         """
         if not self.__finding:
-            if editor.hasSelectedText():
+            if editor.hasSelectedText() and not editor.selectionIsRectangle():
                 line1, index1, line2, index2 = editor.getSelection()
                 if line1 != line2:
                     self.ui.selectionCheckBox.setEnabled(True)

eric ide

mercurial