File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/org/openstreetmap/josm/gui/layer/geoimage Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ private ImageViewerDialog() {
179
179
// model update, then the image will change instead of remaining the same.
180
180
this .layers .getModel ().addChangeListener (l -> {
181
181
// We need to check to see whether or not the worker is shut down. See #22922 for details.
182
- if (!MainApplication .worker .isShutdown ()) {
182
+ if (!MainApplication .worker .isShutdown () && this . isDialogShowing () ) {
183
183
MainApplication .worker .execute (() -> GuiHelper .runInEDT (() -> {
184
184
Component selected = this .layers .getSelectedComponent ();
185
185
if (selected instanceof MoveImgDisplayPanel ) {
@@ -190,6 +190,15 @@ private ImageViewerDialog() {
190
190
});
191
191
}
192
192
193
+ @ Override
194
+ public void showNotify () {
195
+ super .showNotify ();
196
+ Component selected = this .layers .getSelectedComponent ();
197
+ if (selected instanceof MoveImgDisplayPanel ) {
198
+ ((MoveImgDisplayPanel <?>) selected ).fireModelUpdate ();
199
+ }
200
+ }
201
+
193
202
@ Override
194
203
public void hideNotify () {
195
204
super .hideNotify ();
@@ -929,7 +938,7 @@ public void displayImages(List<? extends IImageEntry<?>> entries) {
929
938
}
930
939
if (!isDialogShowing ()) {
931
940
setIsDocked (false ); // always open a detached window when an image is clicked and dialog is closed
932
- showDialog ();
941
+ unfurlDialog ();
933
942
} else if (isDocked && isCollapsed ) {
934
943
expand ();
935
944
dialogsPanel .reconstruct (DialogsPanel .Action .COLLAPSED_TO_DEFAULT , this );
You can’t perform that action at this time.
0 commit comments