File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
representation/src/main/java/org/csstudio/display/builder/representation
runtime/src/main/java/org/csstudio/display/builder/runtime/app Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,11 @@ public interface ToolkitListener
4545 */
4646 default public void handleWrite (Widget widget , Object value ) {};
4747
48+ /**
49+ * A method was called from the UI that other listeners might be interested in.
50+ * @param user_args Zero or more objects relevant to what was called.
51+ * Case-specific Implementations should expect and check these.
52+ */
4853 default public void handleMethodCalled (Object ... user_args ) {};
4954
5055}
Original file line number Diff line number Diff line change 1111
1212
1313import java .awt .geom .Rectangle2D ;
14+ import java .util .ArrayList ;
1415import java .util .Objects ;
1516import java .util .Optional ;
1617import java .util .concurrent .Callable ;
@@ -286,9 +287,12 @@ public DisplayInfo getDisplayInfo()
286287 */
287288 public void loadDisplayFile (final DisplayInfo info )
288289 {
290+ DisplayInfo old_info = display_info .orElse (null );
289291 // If already executing another display, shut it down
290292 disposeModel ();
291293
294+ ArrayList <DisplayInfo > dst_src = new ArrayList <>();
295+
292296 // Set input ASAP so that other requests to open this
293297 // resource will find this instance and not start
294298 // another instance
@@ -324,7 +328,9 @@ public void loadDisplayFile(final DisplayInfo info)
324328 {
325329 representation .awaitRepresentation (30 , TimeUnit .SECONDS );
326330 representation_init .run ();
327- representation .fireMethodCall (info , applicationThreadStackTrace );
331+ dst_src .add (info );
332+ dst_src .add (old_info );
333+ representation .fireMethodCall (dst_src , applicationThreadStackTrace );
328334 logger .log (Level .FINE , "Done with representing model of " + info .getPath ());
329335 }
330336 catch (TimeoutException | InterruptedException ex )
You can’t perform that action at this time.
0 commit comments