Skip to content

Commit

Permalink
fixed image display close(name)
Browse files Browse the repository at this point in the history
  • Loading branch information
supertick committed Sep 1, 2024
1 parent dce0ddf commit c21c2f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/main/java/org/myrobotlab/service/ImageDisplay.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public String close(String name) {
display.frame.dispose();
display.frame = null;
}
display.name = name;
// displays.remove(src);
return name;
}
Expand Down Expand Up @@ -157,7 +158,8 @@ public void display(String src, float opacity) {
public String display(String name, String src) {
Display display = getDisplay(name);
display.src = src;
displayInternal(display.name);
display.name = name;
displayInternal(name);
return name;
}

Expand Down
10 changes: 3 additions & 7 deletions src/main/java/org/myrobotlab/service/Runtime.java
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,7 @@ public static Runtime getInstance() {
if (runtime == null) {
c = ConfigUtils.loadRuntimeConfig(options);
runtime = (Runtime) createService(RUNTIME_NAME, "Runtime", c.id);
runtime.platform = Platform.getLocalInstance();
runtime.startService();
// klunky
Runtime.register(new Registration(runtime));
Expand Down Expand Up @@ -2845,13 +2846,8 @@ public Runtime(String n, String id) {

setLocale(Locale.getDefault().getTag());
locales = Locale.getDefaults();

if (runtime.platform == null) {
runtime.platform = Platform.getLocalInstance();
}

// setting the id and the platform
platform = Platform.getLocalInstance();

Platform platform = Platform.getLocalInstance();

String libararyPath = System.getProperty("java.library.path");
String userDir = System.getProperty("user.dir");
Expand Down

0 comments on commit c21c2f5

Please sign in to comment.