Commit 46ffcb10 authored by helene ortiz's avatar helene ortiz
Browse files

Fix bug reported by S.Ritter: When entering a wrong value for wanted_time in...

Fix bug reported by S.Ritter: When entering a wrong value for wanted_time in command box, the message "wanted_time must be strictly positive" is displayed twice, then "Problem while setting property wanted_time to ..." is displayed, previous value is restored but Start does not work... 
parent 3ad26835
......@@ -21,5 +21,6 @@ package fr.ill.ics.core.property;
public interface IPropertyErrorListener {
public abstract void cannotSetValue(Property property);
public abstract boolean isVisible();
}
\ No newline at end of file
......@@ -350,12 +350,14 @@ public abstract class Property implements ServerPropertyChangeListener, ICommand
// Iterate over listeners and send the notification of property error
Iterator listenerIterator = propertyErrorListeners.iterator();
while (listenerIterator.hasNext()) {
System.out.println("sending property error event !");
IPropertyErrorListener propertyErrorListener = (IPropertyErrorListener) (listenerIterator.next());
propertyErrorListener.cannotSetValue(this);
IPropertyErrorListener propertyErrorListener = (IPropertyErrorListener)(listenerIterator.next());
if (propertyErrorListener.isVisible()) {
// H.ORTIZ 18 JUL 2016: here we have to check if the widget linked with current property is visible, because it can be
// in a hidden part of the screen (in a switchable composite)
propertyErrorListener.cannotSetValue(this);
}
}
}
}
/**
......
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