Hello everyone,

This is in reference to the following bug :
http://bugs.ascend4.org/view.php?id=584
I detected the point in "observer.py" where the unit conversion was being
multiplied instead of divided. I have attached the patch for your
reference. Since this is my first patch towards ASCEND, it would be helpful
if someone could review the same.

Thanking you,
Aditya Jain
Index: pygtk/observer.py
===================================================================
--- pygtk/observer.py	(revision 2849)
+++ pygtk/observer.py	(working copy)
@@ -431,7 +431,7 @@
 	def on_view_cell_edited(self, renderer, path, newtext, col):
 		# we can assume it's always the self.activeiter that is edited...
 		if col.instance.isFixed():
-			val = float(newtext) * col.units.getConversion()
+			val = float(newtext) / col.units.getConversion()
 			col.instance.setRealValue( val )
 			self.browser.reporter.reportNote("Updated value to %f" % float(newtext))
 		else:
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Ascend-sim-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ascend-sim-users

Reply via email to