Author: bugman
Date: Thu Oct 16 18:21:05 2014
New Revision: 26302

URL: http://svn.gna.org/viewcvs/relax?rev=26302&view=rev
Log:
Merged revisions 26291-26292 via svnmerge from 
svn+ssh://[email protected]/svn/relax/trunk

........
  r26291 | bugman | 2014-10-15 17:57:52 +0200 (Wed, 15 Oct 2014) | 9 lines
  
  Fix for the find next bug in the relax controller window.
  
  This is bug #22815 (https://gna.org/bugs/?22815), the failure of find next 
using F3 (or Ctrl-G on
  Mac OS X) in the relax controller window if search text has already been set.
  
  The fix was simple, as the required flags are in the self.find_data class 
object (an instance of
  wx.FindReplaceData).
........
  r26292 | bugman | 2014-10-15 18:23:29 +0200 (Wed, 15 Oct 2014) | 9 lines
  
  Fix for find dialog in the relax controller window.
  
  This is for bug #22816 (https://gna.org/bugs/?22816), the find functionality 
of the relax controller
  window does not find text when using wxPython >= 2.9.
  
  The find wxPython events are now bound to the find dialog rather than the 
relax controller window
  LogCtrl element for displaying the relax messages.  This works on all 
wxPython versions.
........

Modified:
    branches/frame_order_cleanup/   (props changed)
    branches/frame_order_cleanup/gui/controller.py

Propchange: branches/frame_order_cleanup/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Oct 16 18:21:05 2014
@@ -1 +1 @@
-/trunk:1-26278,26283-26290
+/trunk:1-26278,26283-26292

Modified: branches/frame_order_cleanup/gui/controller.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/gui/controller.py?rev=26302&r1=26301&r2=26302&view=diff
==============================================================================
--- branches/frame_order_cleanup/gui/controller.py      (original)
+++ branches/frame_order_cleanup/gui/controller.py      Thu Oct 16 18:21:05 2014
@@ -651,9 +651,6 @@
         self.orig_zoom = self.GetZoom()
 
         # Bind events.
-        self.Bind(wx.EVT_FIND, self.find)
-        self.Bind(wx.EVT_FIND_NEXT, self.find)
-        self.Bind(wx.EVT_FIND_CLOSE, self.find_close)
         self.Bind(wx.EVT_KEY_DOWN, self.capture_keys)
         self.Bind(wx.EVT_MOUSE_EVENTS, self.capture_mouse)
         self.Bind(wx.EVT_MOUSEWHEEL, self.capture_mouse_wheel)
@@ -795,7 +792,7 @@
         sel = self.find_data.GetFindString()
 
         # The search flags.
-        flags = event.GetFlags()
+        flags = self.find_data.GetFlags()
 
         # Shift the search anchor 1 character forwards (if not at the end) to 
ensure the next instance is found.
         pos = self.GetCurrentPos()
@@ -865,7 +862,15 @@
 
         # Initialise the dialog if it doesn't exist.
         if self.find_dlg == None:
+            # Initalise.
             self.find_dlg = wx.FindReplaceDialog(self, self.find_data, "Find")
+
+            # Bind the find events to this dialog.
+            self.find_dlg.Bind(wx.EVT_FIND, self.find)
+            self.find_dlg.Bind(wx.EVT_FIND_NEXT, self.find)
+            self.find_dlg.Bind(wx.EVT_FIND_CLOSE, self.find_close)
+
+            # Show the dialog.
             if status.show_gui:
                 self.find_dlg.Show(True)
 


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
[email protected]

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits

Reply via email to