/[ascend]/branches/adrian/pygtk/modelview.py
ViewVC logotype

Diff of /branches/adrian/pygtk/modelview.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3012 by adrian, Sun Jul 5 12:48:37 2015 UTC revision 3013 by adrian, Wed Jul 15 16:00:10 2015 UTC
# Line 287  class ModelView: Line 287  class ModelView:
287                  units = Preferences().getPreferredUnitsOrigin(str(_instance.getType().getName()))                  units = Preferences().getPreferredUnitsOrigin(str(_instance.getType().getName()))
288                  if units == CelsiusUnits.get_celsius_sign():                  if units == CelsiusUnits.get_celsius_sign():
289                      temp = _value.split(" ")[0]                      temp = _value.split(" ")[0]
290                      _value = CelsiusUnits.convert_kelvin_to_celsius(temp) + " " + CelsiusUnits.get_celsius_sign()                      _value = CelsiusUnits.convert_kelvin_to_celsius(temp, str(_instance.getType())) + " " + CelsiusUnits.get_celsius_sign()
291              ##### CELSIUS TEMPERATURE WORKAROUND              ##### CELSIUS TEMPERATURE WORKAROUND
292              self.modelstore.set_value(_iter, 2, _value)              self.modelstore.set_value(_iter, 2, _value)
293              if _instance.getType().isRefinedSolverVar():              if _instance.getType().isRefinedSolverVar():
# Line 339  class ModelView: Line 339  class ModelView:
339                  pref = Preferences()                  pref = Preferences()
340                  units = pref.getPreferredUnitsOrigin(str(_instance.getType().getName()))                  units = pref.getPreferredUnitsOrigin(str(_instance.getType().getName()))
341                  if units == CelsiusUnits.get_celsius_sign() and len(newtext.split(" ")) == 1 or newtext.split(" ")[1] == CelsiusUnits.get_celsius_sign():                  if units == CelsiusUnits.get_celsius_sign() and len(newtext.split(" ")) == 1 or newtext.split(" ")[1] == CelsiusUnits.get_celsius_sign():
342                      newtext = CelsiusUnits.convert_celsius_to_kelvin(newtext.split(" ")[0])                      newtext = CelsiusUnits.convert_celsius_to_kelvin(newtext.split(" ")[0], str(_instance.getType()))
343                      pref.setPreferredUnits(str(_instance.getType().getName()), CelsiusUnits.get_celsius_sign())                      pref.setPreferredUnits(str(_instance.getType().getName()), CelsiusUnits.get_celsius_sign())
344              ##### CELSIUS TEMPERATURE WORKAROUND              ##### CELSIUS TEMPERATURE WORKAROUND
345    

Legend:
Removed from v.3012  
changed lines
  Added in v.3013

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22