Modify

Opened 2 years ago

Closed 14 months ago

#22860 closed defect (fixed)

[Patch] Geotagged Images dialog confuses tabs

Reported by: GerdP Owned by: GerdP
Priority: normal Milestone: 24.01
Component: Core image mapping Version:
Keywords: template_report regression Cc: taylor.smock

Description (last modified by GerdP)

What steps will reproduce the problem?

Not sure how to reproduce

  1. have multiple layers with geotagged images
  2. press Y to open the Geotagged Images dialog with an image of one layer
  3. click on an image that belongs to another image layer, the dialog shows tabs for the different layers, one has an asterisc (*) that marks it as active(?)
  4. click one the left/right buttons

What is the expected result?

The previous/next image that belongs to the active image layer

What happens instead?

Sometimes a different layer is activated and unexpected images are shown. Even when I close the unwanted tab it is reopend with a click on the left/right button.
Makes the dialog unuasble.
Seems this was introduced with a recend change, never saw this before r18700.

Please provide any additional information below. Attach a screenshot if possible.

If I got that right I just have to wait a few seconds to restore the expected behaviour or maybe switch to a different program.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2023-03-30 16:51:36 +0200 (Thu, 30 Mar 2023)
Revision:18700
Build-Date:2023-03-31 01:30:56
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18700 en) Windows 10 64-Bit
OS Build number: Windows 10 Home 2009 (19045)
Memory Usage: 1527 MB / 1972 MB (339 MB allocated, but free)
Java version: 17.0.4+8-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920×1080 (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: Cp1252
System property sun.jnu.encoding: Cp1252
Locale info: en_DE
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.18531, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=%UserProfile%\AppData\Local\JOSM\HWConsole.exe]
Dataset consistency test: No problems found

Plugins:
+ OpeningHoursEditor (35924)
+ RoadSigns (36038)
+ apache-commons (36034)
+ buildings_tools (36011)
+ contourmerge (v0.1.9)
+ ejml (35924)
+ geotools (36028)
+ jackson (36034)
+ jaxb (35952)
+ jts (36004)
+ o5m (35893)
+ opendata (36025)
+ pbf (36034)
+ poly (35976)
+ reltoolbox (35976)
+ reverter (36043)
+ undelete (36011)
+ utilsplugin2 (36011)

Validator rules:
+ c:\josm\core\resources\data\validator\combinations.mapcss
+ c:\josm\core\resources\data\validator\geometry.mapcss
+ c:\josm\core\resources\data\validator\unnecessary.mapcss
+ d:\java_tools\JOSM\mygeometry.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Rules/GermanySpecific&zip=1

Last errors/warnings:
- 00764.499 E: Failed to locate image 'Flag, Blue'
- 00764.500 E: Failed to locate image 'Flag, Blue'
- 00764.500 E: Failed to locate image 'Flag, Blue'
- 00764.501 E: Failed to locate image 'Flag, Blue'
- 00764.502 E: Failed to locate image 'Flag, Blue'
- 00764.502 E: Failed to locate image 'Flag, Blue'
- 00764.504 E: Failed to locate image 'Flag, Blue'
- 00764.505 E: Failed to locate image 'Flag, Blue'
- 00764.505 E: Failed to locate image 'Flag, Blue'
- 00764.506 E: Failed to locate image 'Flag, Blue'

Attachments (0)

Change History (8)

comment:1 by GerdP, 2 years ago

Description: modified (diff)

comment:2 by skyper, 2 years ago

Component: CoreCore image mapping

comment:3 by GerdP, 2 years ago

Hmm, cannot reproduce this with a clean installation, but always with my settings. Option --skip-plugins doesn't change anything, so it seems to be related to a preference. Any idea what I can try to change?

comment:4 by GerdP, 2 years ago

Seems that my test with preference geoimage.viewer.show.tabs=false is the culprit. Whatever this is meant to do, it just causes trouble.

comment:5 by skyper, 2 years ago

Related to #22806.

comment:6 by GerdP, 14 months ago

Cc: taylor.smock added
Owner: changed from team to GerdP
Status: newassigned
Summary: Geotagged Images dialog confuses tabs[Patch] Geotagged Images dialog confuses tabs

I think one-liner fixes the problem. It removes previously shown images so that only one image is shown and no tabs are used
when preference geoimage.viewer.show.tabs=false is used.

  • src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java

     
    914914                    .filter(IGeoImageLayer.class::isInstance).map(IGeoImageLayer.class::cast).collect(Collectors.toList());
    915915        if (!Config.getPref().getBoolean("geoimage.viewer.show.tabs", true)) {
    916916            updateRequired = true;
     917            layers.removeAll();
    917918            // Clear the selected images in other geoimage layers
    918919            this.getImageTabs().map(m -> m.layer).filter(IGeoImageLayer.class::isInstance).map(IGeoImageLayer.class::cast)
    919920                    .filter(l -> !Objects.equals(entries, l.getSelection()))

comment:7 by GerdP, 14 months ago

Milestone: 24.01

In 18944/josm:

fix #22806 Cannot disable tabs in image viewer and #22860 Geotagged Images dialog confuses tabs
If preference geoimage.viewer.show.tabs=false is set, make sure that only the recent image is selected

comment:8 by GerdP, 14 months ago

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain GerdP.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.