Not used code deleted

git-svn-id: http://www.neo1973-germany.de/svn@173 46df4e5c-bc4e-4628-a0fc-830ba316316d
main
PatrickBeck 16 years ago
parent a364a9459e
commit 56a2a0922a

@ -151,18 +151,10 @@ class unitconvert(object):
else:
toref = units.getAttribute('to_ref')
# if self.fromactive == 1: # select the basis for the calculation => when the from field was changed use the data from this field
# number = number_from
# if self.toactive == 1:
# number = number_to
result = eval(toref) # execute the formular in the toref field and safe it to result
endresult = eval(fromref) # convert from the refunit to the target unit
printresult = str(endresult).replace('.',',') # for the better readability replace the dot with a comma
# if self.fromactive == 1:
# self.toentry_set(printresult) # sets the result into the 'from' field
# else:
self.fromentry_set(printresult) # same as above for the 'to' field
else:
@ -185,19 +177,11 @@ class unitconvert(object):
else:
toref = units.getAttribute('to_ref')
# if self.fromactive == 1: # select the basis for the calculation => when the from field was changed use the data from this field
# number = number_from
# if self.toactive == 1:
# number = number_to
result = eval(toref) # execute the formular in the toref field and safe it to result
endresult = eval(fromref) # convert from the refunit to the target unit
printresult = str(endresult).replace('.',',') # for the better readability replace the dot with a comma
# if self.fromactive == 1:
self.toentry_set(printresult) # sets the result into the 'from' field
# else:
# self.fromentry_set(printresult) # same as above for the 'to' field
def clear(self, widget): # clears the entry fields
self.fromentry.set_text('')

Loading…
Cancel
Save