[Skencil-commits] r534 - in skencil/branches/skencil-0.6: . Sketch/Graphics

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sat Mar 18 21:05:44 CET 2006


Author: bh
Date: 2006-03-18 21:05:44 +0100 (Sat, 18 Mar 2006)
New Revision: 534

Modified:
   skencil/branches/skencil-0.6/ChangeLog
   skencil/branches/skencil-0.6/Sketch/Graphics/document.py
Log:

* Sketch/Graphics/document.py (EditDocument.CanConvertToCurve)
(EditDocument.ConvertToCurve): Allow multiple objects to be
converted to curves at once.


Modified: skencil/branches/skencil-0.6/ChangeLog
===================================================================
--- skencil/branches/skencil-0.6/ChangeLog	2006-03-05 00:07:40 UTC (rev 533)
+++ skencil/branches/skencil-0.6/ChangeLog	2006-03-18 20:05:44 UTC (rev 534)
@@ -1,3 +1,9 @@
+2006-03-18  Bernhard Herzog  <bh at intevation.de>
+
+	* Sketch/Graphics/document.py (EditDocument.CanConvertToCurve)
+	(EditDocument.ConvertToCurve): Allow multiple objects to be
+	converted to curves at once.
+
 2006-02-12  Bernhard Herzog  <bh at intevation.de>
 
 	* setup.py (install_file): Patch the first line of scripts so that

Modified: skencil/branches/skencil-0.6/Sketch/Graphics/document.py
===================================================================
--- skencil/branches/skencil-0.6/Sketch/Graphics/document.py	2006-03-05 00:07:40 UTC (rev 533)
+++ skencil/branches/skencil-0.6/Sketch/Graphics/document.py	2006-03-18 20:05:44 UTC (rev 534)
@@ -1890,8 +1890,10 @@
 		self.end_transaction()
 
     def CanConvertToCurve(self):
-	return len(self.selection) == 1 \
-	       and self.selection.GetObjects()[0].is_curve
+        for obj in self.selection.GetObjects():
+            if obj.is_curve:
+                return 1
+        return 0
 
     def ConvertToCurve(self):
 	if self.CanConvertToCurve():
@@ -1901,7 +1903,7 @@
                     selection = []
                     edited = 0
                     for info, object in self.selection.GetInfo():
-                        if object.is_Bezier:
+                        if object.is_Bezier or not object.is_curve:
                             selection.append((info, object))
                         else:
                             bezier = object.AsBezier()



More information about the Skencil-commits mailing list