The code.ill.fr has been recreated and upgraded with the latest version this weekend, If you encounter any problem please inform the Helpdesk.

Commit e4e6f4fb authored by Remi Perenon's avatar Remi Perenon
Browse files

Solving unit changing issue

parent 202bcb4c
......@@ -23,10 +23,11 @@ class UnitsSettingsError(Error):
class UnitsSettingsDialog():
def checkUnits(self, oldUnit, newUnit):
try:
magnitude.mg(1., oldUnit, newUnit).toval()
except magnitude.MagnitudeError:
raise UnitsSettingsError("the axis unit (%s) is inconsistent with the current unit (%s) "%(newUnit, oldUnit))
if oldUnit != newUnit:
try:
magnitude.mg(1., oldUnit, newUnit).toval()
except magnitude.MagnitudeError:
raise UnitsSettingsError("the axis unit (%s) is inconsistent with the current unit (%s) "%(newUnit, oldUnit))
class ImageSettingsDialog(wx.Dialog, UnitsSettingsDialog):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment