dabo Commit
Revision 6949
Date: 2011-10-28 09:57:44 -0700 (Fri, 28 Oct 2011)
Author: Ed
Trac: http://trac.dabodev.com/changeset/6949
Changed:
U trunk/dabo/ui/uiwx/dEditor.py
Log:
Changed the Modified property to read-write so that an editor can be marked as
dirty or not.
Diff:
Modified: trunk/dabo/ui/uiwx/dEditor.py
===================================================================
--- trunk/dabo/ui/uiwx/dEditor.py 2011-10-28 12:37:03 UTC (rev 6948)
+++ trunk/dabo/ui/uiwx/dEditor.py 2011-10-28 16:57:44 UTC (rev 6949)
@@ -2203,7 +2203,15 @@
def _getModified(self):
return self.GetModify()
+ def _setModified(self, val):
+ if val:
+ selpos = self.SelectionPosition
+ self.SetText(self.GetText())
+ self.SelectionPosition = selpos
+ else:
+ self.SetSavePoint()
+
def _getReadOnly(self):
return self.GetReadOnly()
@@ -2571,7 +2579,7 @@
LineCount = property(_getLineCount, None, None,
_("Total number of lines in the document (int)"))
- Modified = property(_getModified, None, None,
+ Modified = property(_getModified, _setModified, None,
_("Has the content of this editor been modified?
(bool)"))
ReadOnly = property(_getReadOnly, _setReadOnly, None,
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]