dia r4277 - in trunk: . plug-ins/python



Author: hans
Date: Sat Feb 14 23:30:57 2009
New Revision: 4277
URL: http://svn.gnome.org/viewvc/dia?rev=4277&view=rev

Log:
2009-02-14  Hans Breuer  <hans breuer org>

	* plug-ins/python/scascale.py : check input feasibility, bug #440884


Modified:
   trunk/ChangeLog
   trunk/plug-ins/python/scascale.py

Modified: trunk/plug-ins/python/scascale.py
==============================================================================
--- trunk/plug-ins/python/scascale.py	(original)
+++ trunk/plug-ins/python/scascale.py	Sat Feb 14 23:30:57 2009
@@ -71,9 +71,13 @@
 
 	def on_scale(self, *args) :
 		s = self.entry.get_text()
-		SimpleScale (self.data, float(s))
-		self.data.update_extents ()
-		self.diagram.flush()
+		scale = float(s)
+		if scale > 0.001 and scale < 1000 :
+			SimpleScale (self.data, float(s))
+			self.data.update_extents ()
+			self.diagram.flush()
+		else :
+			dia.message(1, "Value out of range!")
 		self.win.destroy ()
 
 	def on_delete (self, *args) :



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]