]> git.saurik.com Git - wxWidgets.git/commitdiff
- undo/redo fix for nonchecked items
authorRoman Rolinsky <rolinsky@femagsoft.com>
Thu, 15 Mar 2007 19:17:27 +0000 (19:17 +0000)
committerRoman Rolinsky <rolinsky@femagsoft.com>
Thu, 15 Mar 2007 19:17:27 +0000 (19:17 +0000)
- global modified state set as soon as possible
- "option" property renamed to "proportion"

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/wx/tools/XRCed/panel.py
wxPython/wx/tools/XRCed/xrced.py

index 43fe83d6ad7d11f4bd79f93899e2751c831a39b3..0f098eef3df5fe835e313d1ccc8aab9fcd4568da 100644 (file)
@@ -160,6 +160,7 @@ class Panel(wx.Notebook):
         # Register undo object when modifying first time
         if not self.modified and value:
            g.undoMan.RegisterUndo(UndoEdit())
+           g.frame.SetModified()
         self.modified = value
         
     def Apply(self):
@@ -258,7 +259,8 @@ class ParamPage(wx.Panel):
         for k,v,e in state[1]:
             self.controls[k].SetValue(v)
             self.controls[k].Enable(e)
-            if e: self.controls[k].modified = True
+            # Set all states to modified
+            if e and k in self.xxx.params: self.controls[k].modified = True            
         if self.controlName:
             self.controlName.SetValue(state[2])
 
@@ -290,8 +292,9 @@ class PropPage(ParamPage):
                     label = wx.StaticText(self, paramIDs[param], param + ':',
                                           size = (LABEL_WIDTH,-1), name = param)
             else:
-                # Notebook has one very loooooong parameter
+                # Rename some parameters
                 if param == 'usenotebooksizer': sParam = 'usesizer:'
+                elif param == 'option': sParam = 'proportion'
                 else: sParam = param + ':'
                 label = wx.CheckBox(self, paramIDs[param], sParam,
                                    size = (LABEL_WIDTH,-1), name = param)
index 23cce5040b76369fbb12b5c15448179b7c9e4a43..36bd890746d2bcd6213087c296465af05ae003ea 100644 (file)
@@ -479,10 +479,14 @@ class Frame(wx.Frame):
         # Extra check to not mess with idle updating
         if undoMan.CanUndo():
             undoMan.Undo()
+            g.panel.SetModified(False)
+            if not undoMan.CanUndo():
+                self.SetModified(False)
 
     def OnRedo(self, evt):
         if undoMan.CanRedo():
             undoMan.Redo()
+            self.SetModified(True)
 
     def OnCopy(self, evt):
         selected = tree.selection
@@ -1635,7 +1639,8 @@ Please upgrade wxWidgets to %d.%d.%d or higher.''' % MinWxVersion)
             cwd = os.getcwd()
             try:
                 for dir in plugins.split(':'):
-                    if os.path.isdir(dir):
+                    if os.path.isdir(dir) and \
+                       os.path.isfile(os.path.join(dir, '__init__.py')):
                         # Normalize
                         dir = os.path.abspath(os.path.normpath(dir))
                         sys.path = sys_path + [os.path.dirname(dir)]