#21605 closed enhancement (fixed)
Mapillary and photomapping - separate image windows
Reported by: | richlv | Owned by: | taylor.smock |
---|---|---|---|
Priority: | normal | Milestone: | 22.12 |
Component: | Core image mapping | Version: | tested |
Keywords: | Cc: |
Description
Previously, for a long time, there were separate image windows for Mapillary and photomapping images.
That is, I could have a Mapillary image open and a separate image open at the same time, and independently switch between them.
This was extremely useful, as my usual workflow is to step through mapping images, taken separately, and view Mapillary imagery as necessary. I would check various sequences, step forward and back in them to figure out detail etc.
it was also very useful to see both mapping photo and Mapillary image at the same time.
Now the image windows appear to be merged. This is great because of the unified functionality, but it breaks the mapping workflow pretty bad. Switching between the two types of images is cumbersome, and keeping track of the mapping photos is close to impossible in longer editing sessions.
In those sessions, I stopped using Mapillary images in JOSM, preferring to see find them in a browser manually instead.
Attachments (23)
Change History (83)
comment:1 by , 3 years ago
comment:2 by , 3 years ago
Component: | Plugin mapillary → Core image mapping |
---|
comment:3 by , 2 years ago
Heya, any luck here?
Switching between those two image types fairly cumbersome still :)
comment:5 by , 2 years ago
Thank you for the quick reply :)
There's also a usability problem with the latest version:
- load several geotagged images
- observe how it's possible to step back/forth in those images
- load Mapillary images
- click on any Mapillary image
- click back on the geotagged image
- observe that stepping through geotagged images is not possible anymore, start/end buttons briefly show a message about Mapillary images instead
Would that be better reported as a separate bug?
by , 2 years ago
Attachment: | Screen Shot 2022-10-04 at 8.57.56 AM.png added |
---|
by , 2 years ago
Attachment: | Screen Shot 2022-10-04 at 8.58.00 AM.png added |
---|
comment:8 by , 2 years ago
comment:9 by , 2 years ago
@richlv: Let me know if the patch works for your use case.
@holgerosm: When you added GeoImageLayer#clearOtherCurrentPhotos
, the image viewer did not support multiple layers. Does this remove the need for clearOtherCurrentPhotos
? I think it does, but I don't know if there is some other location in the codebase of JOSM and JOSM plugins that expects the current behavior. Note: if you don't remember, or feel like responding, that is OK. It was 9 years ago.
follow-up: 11 comment:10 by , 2 years ago
Thank you so much, this looks very promising :)
Trying the test jar, opened a geotagged image and loaded Mapillary layer.
Clicked on a Mapillary image.
There's a button "Geotagged Images" with a nice preview, but clicking it does nothing, and there's no Mapillary button (to switch back to the previously viewed Mapillary pic).
comment:11 by , 2 years ago
Replying to richlv:
There's a button "Geotagged Images" with a nice preview, but clicking it does nothing, and there's no Mapillary button (to switch back to the previously viewed Mapillary pic).
I need to make changes in the Mapillary plugin for it to work with the changes. Pretty much, I have to tell the image viewer dialog which layer the image "belongs" to.
EDIT: To clarify, currently only geoimage layers have been hooked up (in attachment:21605.1.patch).
by , 2 years ago
Attachment: | 21605.2.patch added |
---|
Load icons in background thread, add reload
method for plugins, add private class for action listeners for updating the image viewer
comment:12 by , 2 years ago
@richlv: I've uploaded a new jar. It should work better with non-updated plugins (like Mapillary).
comment:13 by , 2 years ago
Milestone: | → 22.11 |
---|
by , 2 years ago
comment:15 by , 2 years ago
It does not behave very gracefully when there are many layers.
To recreate what you see in the animated gif:
- Load the attached session file. It will create multiple geoimage layers.
- Click on each camera icon to make the buttons appear. There is one image in each layer.
I have some suggestions:
- The buttons could occupy more than one row.
- The area containing the buttons could be scrollable horizontally.
- The buttons could reduce in width dynamically when there is not enough space, and they could display a tooltip with the name of the layer.
comment:16 by , 2 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
follow-up: 19 comment:18 by , 2 years ago
There is a reason why I applied the patch on November 09. I was really hoping to have any major bugs reported prior to the release. I didn't see anything during testing, but the feature was sufficiently complex that I did not know all the code paths that would be affected. One of which is Open...
apparently.
@skyper: What is your expected behavior? It works for me (if I click on the image icon).
@ar2988-os: Thanks for the gif. When I wrote the patch, I didn't anticipate users would have many geoimage layers open (you have 9). I was originally planning on using a JTabbedPane
for this, which probably would have done what you expected, but then we would potentially have had multiple images loaded at the same time (not a good idea for memory reasons). I'll go back and see if I can make JTabbedPane
work without killing people's memory.
follow-up: 23 comment:19 by , 2 years ago
Replying to taylor.smock:
@skyper: What is your expected behavior? It works for me (if I click on the image icon).
Current behavior is fine with me. I just noticed the different behavior between tested and latest while playing around.
follow-up: 24 comment:22 by , 2 years ago
The tabs do their job. But they break the UI of JOSM. Currently all other layer handling is done in the Layer List window like activating, hiding, sorting and so on.
With the placement of the tabs in the Image window now the Image window becomes a part of navigating between layers. Can the function of the tabs be replaced by - for example - a double click on the layer name in the Layer list? Visual feedback could be done by icons in that window. Please see #16056 for a suggestion.
Also in r18604 the title of the Image window should show to the name of the image source layer. And the title should change when switching between image layers:
by , 2 years ago
Attachment: | ImageWindowTitle.jpg added |
---|
comment:23 by , 2 years ago
Replying to skyper:
Replying to taylor.smock:
@skyper: What is your expected behavior? It works for me (if I click on the image icon).
Current behavior is fine with me. I just noticed the different behavior between tested and latest while playing around.
Oh, wait a minute. Now the Geotagged Image item is missing in the windows menu until I'll click on an image. I also found #18433.
comment:24 by , 2 years ago
follow-up: 26 comment:25 by , 2 years ago
@Hb--: I would have appreciated the feedback two weeks ago. I merged this on November 9 (8 days after the previous stable) in order to allow josm-latest
users a chance to (a) give feedback and (b) find any bugs that I missed during manual testing (it is a PITA to do unit testing on UI stuff, and I know I'm going to miss stuff), specifically to avoid a situation where I get all the feedback right after I do a stable release, and then I have to do a hotfix release.
As an aside, I don't think #16056 is a duplicate with this ticket, but I might as well fix it at the same time.
@skyper: for #18433, I'll have to figure out what is actually being done -- if it is creating a GeoImage layer, then the fix should be "easy". Otherwise I'll have to figure out how the images are actually being stored.
Oh, wait a minute. Now the Geotagged Image item is missing in the windows menu until I'll click on an image. I also found #18433.
I think it has always been missing from the menu until an image is selected to be shown. It always has been lazily initialized and added. IIRC, I had to do a hackish workaround to make certain that the dialog was available in the Mapillary plugin.
See GeoImageLayer.java for when the image viewer window is added to the window list.
follow-up: 27 comment:26 by , 2 years ago
Replying to taylor.smock:
Oh, wait a minute. Now the Geotagged Image item is missing in the windows menu until I'll click on an image.
I think it has always been missing from the menu until an image is selected to be shown.
Not for me. I just rechecked again and with tested (r18583) the image viewer window is opened when the first image layer is created and the menu item is available. Most of the time an image is selected but once I got an "empty" image viewer window without a selected image. Additionally, the menu item does not disappear if all image layers are deleted.
comment:27 by , 2 years ago
Replying to skyper:
Not for me. I just rechecked again and with tested (r18583) the image viewer window is opened when the first image layer is created and the menu item is available. Most of the time an image is selected but once I got an "empty" image viewer window without a selected image. Additionally, the menu item does not disappear if all image layers are deleted.
I guess I was wrong. The important bit is that a geoimage layer was created (I don't think it even has to be added to the layer manager), although that usually leads to an image being shown.
comment:28 by , 2 years ago
I'd appreciate feedback on the patch (see attachment:josm-custom.jar).
Please note that the attached jar contains patches for the following tickets:
- #21423: Prevent error codes from clashing (validator ignore list)
- #21607/#20768: OAuth 2.0 support (and allow users to remove OAuth tokens from the UI)
- There may be some incompatibilities with the current version of native password manager. I've got a diff for that as well.
- This is a rather large change, mostly due to having to keep OAuth 1.0a support for now (I think a transition period of 1 y ear should be fine for this)
- This particular patch is highly likely to have bugs. Please add issues to #20768 for the current implementation.
- #21931: .nmea/.pos/.wpt files always ask to be saved
Additional changes (no ticket):
- Some work on trying to improve memory usage in VectorDataSet
- Allow coverage to work when starting from IntelliJ
- Log exceptions in worker thread to console
follow-up: 30 comment:29 by , 2 years ago
Wow, thanks, much better now.
- the height of the layer buttons on top is a little bit too small if more than one row is needed and only the bottom row is selectable.
- the window title name is wrong when switching between layers. It always shows the name of the first file.
- once I ended up with an empty image viewer after deleting the active layer and even clicking on image icon of an additional image layer did not display the layer in the image viewer but I cannot reproduce.
I wonder if it is better to always add all visible image layers to the image layer tabs without the need of clicking on an image icon first. Speaking of this I would hide hidden image layers from the image layer tabs.
follow-up: 31 comment:30 by , 2 years ago
Replying to skyper:
Wow, thanks, much better now.
- the height of the layer buttons on top is a little bit too small if more than one row is needed and only the bottom row is selectable.
I haven't been able to reproduce. Screenshot?
- the window title name is wrong when switching between layers. It always shows the name of the first file.
It turns out there are a couple of places where the title is set. I'm centralizing it now.
- once I ended up with an empty image viewer after deleting the active layer and even clicking on image icon of an additional image layer did not display the layer in the image viewer but I cannot reproduce.
Ouch. Let me know if you can reproduce.
I wonder if it is better to always add all visible image layers to the image layer tabs without the need of clicking on an image icon first. Speaking of this I would hide hidden image layers from the image layer tabs.
I am adding an interface (IGeoImageLayer
), so this should technically be possible. Maybe disable tabs if there are no images selected and/or the layer is invisible?
by , 2 years ago
Attachment: | josm_21605_too_small_tabs.jpg added |
---|
screenshot with too small height of tabs
comment:31 by , 2 years ago
Replying to taylor.smock:
Replying to skyper:
Wow, thanks, much better now.
- the height of the layer buttons on top is a little bit too small if more than one row is needed and only the bottom row is selectable.
I haven't been able to reproduce. Screenshot?
Oh, I was wrong about the selection. It works but without indication as the tab does not rise.
I wonder if it is better to always add all visible image layers to the image layer tabs without the need of clicking on an image icon first. Speaking of this I would hide hidden image layers from the image layer tabs.
I am adding an interface (
IGeoImageLayer
), so this should technically be possible. Maybe disable tabs if there are no images selected and/or the layer is invisible?
I just found some images which I was unable to correlate and therefore no image icons are rendered. If it is the first image layer the images are still displayed in the image viewer but if there is already an image layer I am not able to get a tab for the uncorrelated images.
follow-up: 33 comment:32 by , 2 years ago
I think this is a HideableTabbedPane issue -- the only other place we use it is in JOSM preferences.
Anyway, it works fine under Mac OS LaF, so someone (probably me) will have to figure out what adjustments to make for that.
Oh, I was wrong about the selection. It works but without indication as the tab does not rise.
It actually does. The problem being you cannot see it due to all the layers having the same name. If you have expert mode checked, I do additionally add the layer index to the title.
I just found some images which I was unable to correlate and therefore no image icons are rendered. If it is the first image layer the images are still displayed in the image viewer but if there is already an image layer I am not able to get a tab for the uncorrelated images.
I think this is a generic problem. We should probably have an additional window for uncorrelated images. Which we need to get somehow.
follow-up: 34 comment:33 by , 2 years ago
Replying to taylor.smock:
Oh, I was wrong about the selection. It works but without indication as the tab does not rise.
It actually does. The problem being you cannot see it due to all the layers having the same name. If you have expert mode checked, I do additionally add the layer index to the title.
I see. Well the shuffling of position is unexpected and confusing for me. What is the advantage?
I just found some images which I was unable to correlate and therefore no image icons are rendered. If it is the first image layer the images are still displayed in the image viewer but if there is already an image layer I am not able to get a tab for the uncorrelated images.
I think this is a generic problem. We should probably have an additional window for uncorrelated images. Which we need to get somehow.
I think this could be solved by adding a tab for each image layer even without a selected image icon in mapview.
comment:34 by , 2 years ago
Replying to skyper:
I see. Well the shuffling of position is unexpected and confusing for me. What is the advantage?
I have no clue why JTabbedPane does that. It is something that is consistent across Java programs that use that particular swing component. TBH, when we create a new geo image layer, we should increment the name like we do with data layers.
I think this could be solved by adding a tab for each image layer even without a selected image icon in mapview.
I don't think it can be -- how can users select an image they cannot see? I really think we need a separate pane for invalid geo images.
by , 2 years ago
Attachment: | All tabs appear at once.png added |
---|
by , 2 years ago
Attachment: | Only vestige of tab has appeared.png added |
---|
comment:35 by , 2 years ago
@Adrian: That is due to the current implementation of HideableTabbedPane. You'll notice the same problem in JOSM Preferences -> Display
and Colors
.
follow-up: 37 comment:36 by , 2 years ago
(ar2988-os, now with an account thanks to stoecker.) I am sorry it took me a while to find time to try out the new tabbed feature. It also took a while to create the files I attached. (I encountered a number of minor bugs in the handling of session files: possibly session files from a few years ago cannot be modified with current versions of JOSM, but I don't have time to investigate so that I could submit a useful ticket.)
The JTabbedPane
seems to be a good solution. I often have 40 geoimage layers loaded in JOSM, although it would be unusual for me to create more than five tabs during one editing session. JOSM easily handles 40 geoimage layers. The most geoimage layers I have in one session file is 16.
I have done some testing but I have not tesed with Mapillary images. I have discovered some bugs. To reproduce:
- Launch JOSM, or delete all layers if JOSM is already running.
- Load the session file attached earlier (21605.joz, below comment:14, I couldn't find out what is the markup for referring to an attachment.
All the tabs are opened immediately, and the tabs for hidden layers are not greyed-out. I assume no tabs should appear until you click on a camera icon. I note that the selected tab is highlighted (with Mac LaF). Note: screenshot taken from my 16-layer file.
- Delete all layers except the gpx layer.
- Load the session file again.
- Click on one of the images.
Only a vestigial tab appears.
If you then click on an image in another layer, the tabs appear normally.
If you click on a tab, the row jumps to the bottom, which is rather disconcerting. But maybe this is built-in behaviour of JTabbedPane
and there is nothing you can do about it.
It would need to be documented that tabs are greyed-out and unselectable when the corresponding layer is hidden. This feature puzzled me until I discovered the explanation.
I also have some suggestions. I would like the map view to show which image is being viewed. At the moment, you can have several images highlighted in red. I suggest the image being viewed should continue to be highlighted in red, but the selected images in other layers should be highlighted in a different colour (maybe cyan).
Also, I would like to see the tabs sorted in descending order of the layer number. This would match the order of the layers in the Layers panel. At the moment, the tabs appear in the order in which they were created, as you click on icons in different layers. And the tabs cannot be re-ordered by drag-and-drop. The order of the tabs also changes when you click on a row and it jumps to the bottom. If you then re-sorted the tabs, the row would go back to where it was, although the jumping tabs would look ugly. In the first screenshot, you can see the tabs are in a random order. In this (bug) case, I think the tabs are in the order in which the layers appear in the session file (the layers in the file are not sorted by number), although I haven't checked this.
comment:37 by , 2 years ago
Replying to Adrian:
(ar2988-os, now with an account thanks to stoecker.) I am sorry it took me a while to find time to try out the new tabbed feature. It also took a while to create the files I attached. (I encountered a number of minor bugs in the handling of session files: possibly session files from a few years ago cannot be modified with current versions of JOSM, but I don't have time to investigate so that I could submit a useful ticket.)
No worries. It is just that I specifically try to apply patches for larger features at the beginning of a cycle (a few days after the last tested release, assuming no major bug reports) so that people on josm-latest
will be able to give feedback before the next tested
release.
I have done some testing but I have not tesed with Mapillary images. I have discovered some bugs. To reproduce:
Don't bother. While the last patch I uploaded worked with Mapillary, what I'll be uploading in a minute or so will not. So I'll have to update Mapillary. Fortunately I know the maintainer rather well. :)
- Launch JOSM, or delete all layers if JOSM is already running.
- Load the session file attached earlier (21605.joz, below comment:14, I couldn't find out what is the markup for referring to an attachment.
All the tabs are opened immediately, and the tabs for hidden layers are not greyed-out. I assume no tabs should appear until you click on a camera icon. I note that the selected tab is highlighted (with Mac LaF). Note: screenshot taken from my 16-layer file.
I'd have to check, but it looks like (on my machine) all of the images are pre-selected, which means they should show up in the image viewer tabs.
Only a vestigial tab appears.
If you then click on an image in another layer, the tabs appear normally.
Since the image viewer might be docked, I was trying to avoid taking up vertical space when it was not necessary.
If you click on a tab, the row jumps to the bottom, which is rather disconcerting. But maybe this is built-in behaviour of
JTabbedPane
and there is nothing you can do about it.
Yep. This is built in behavior, and I don't think I can change it. I am thinking I might need to always show the layer number because of brand new geo image layers all have the same name.
It would need to be documented that tabs are greyed-out and unselectable when the corresponding layer is hidden. This feature puzzled me until I discovered the explanation.
Thank you for this feedback. Would a tooltip help? Or I could just disable that feature, as it wasn't something I was planning on adding.
I also have some suggestions. I would like the map view to show which image is being viewed. At the moment, you can have several images highlighted in red. I suggest the image being viewed should continue to be highlighted in red, but the selected images in other layers should be highlighted in a different colour (maybe cyan).
This shouldn't be too difficult.
Also, I would like to see the tabs sorted in descending order of the layer number. This would match the order of the layers in the Layers panel. At the moment, the tabs appear in the order in which they were created, as you click on icons in different layers. And the tabs cannot be re-ordered by drag-and-drop. The order of the tabs also changes when you click on a row and it jumps to the bottom. If you then re-sorted the tabs, the row would go back to where it was, although the jumping tabs would look ugly. In the first screenshot, you can see the tabs are in a random order. In this (bug) case, I think the tabs are in the order in which the layers appear in the session file (the layers in the file are not sorted by number), although I haven't checked this.
I thought I was sorting the tabs already, but not after a tab is selected. But it looks like I currently have a bug where two of a tab are sometimes added. Making the window narrow enough to only show one tab per row seems to have them in (almost) the right order, with the caveat that I've got some kind of duplicate problem, which is probably causing other issues.
by , 2 years ago
Attachment: | 21605.4.patch added |
---|
comment:38 by , 2 years ago
With the latest jar file, I've colorized the non-viewed images in geoimage layers with a pink color. You can change this with the geoimage.selected.not.image.viewer
color property, but you will need to remove and add the geo image layers.
I'm open to better colors. I don't think it looks good.
As an aside, I don't think I'll be doing a release this month -- right now, I'm effectively looking at ripping a good chunk of code I just added (specifically, several public methods), and I don't want plugins to have to update to a tested
release which has code that is quickly going away.
EDIT: @skyper: see #18433 for the issue for non-geotagged images
follow-up: 40 comment:39 by , 2 years ago
@taylor.smock: Thank you for addressing my comments.
In comment:36 I was trying to draw attention to the different result from opening the first session file, and opening subsequent session files, after starting with no layers. With the first file, tabs are created immediately for all the geoimage layers. With subsequent files, no tabs are created. This remains the case with the new custom jar you attached.
Other behaviour has changed with the new custom jar.
The tabs do now appear in sorted order, which is much appreciated. But (new discovery) if you re-order the geoimage layers using the arrow buttons in the Layers panel, the tabs are not re-sorted.
Instead of tabs being created one-by-one as you click on image icons in different layers, tabs for all the layers are now created, the first time you click on an icon. I would prefer the one-by-one approach so that my image viewer window is not encumbered by 40 tabs. But does the one-by-one approach make sorting more difficult?
I think it is a good idea, as you have done, to put the name of the selected layer in the title bar of the viewer window. Can I suggest in addition, that you mark the selected tab by putting an asterisk in front of the layer name in the tab. This would work on all platforms.
You asked about the greying-out feature. I think it is an unnecessary complication and it would be preferable to disable it.
You also asked about the highlight colour for non-viewed images. Can I suggest dull red #C00000, by analogy with greying-out?
by , 2 years ago
Attachment: | 21605.6.patch added |
---|
follow-up: 41 comment:40 by , 2 years ago
Replying to Adrian:
@taylor.smock: Thank you for addressing my comments.
In comment:36 I was trying to draw attention to the different result from opening the first session file, and opening subsequent session files, after starting with no layers. With the first file, tabs are created immediately for all the geoimage layers. With subsequent files, no tabs are created. This remains the case with the new custom jar you attached.
This was due to the way I was ensuring that the image viewer would be displayed.
Other behaviour has changed with the new custom jar.
The tabs do now appear in sorted order, which is much appreciated. But (new discovery) if you re-order the geoimage layers using the arrow buttons in the Layers panel, the tabs are not re-sorted.
Fixed.
Instead of tabs being created one-by-one as you click on image icons in different layers, tabs for all the layers are now created, the first time you click on an icon. I would prefer the one-by-one approach so that my image viewer window is not encumbered by 40 tabs. But does the one-by-one approach make sorting more difficult?
Right now, the only way to "close" a tab is to remove a layer, so this is probably the best for now. I can probably get a one-by-one approach working, but I don't think it will be a small task.
Right now, you still have to click on a layer to populate the tabs, but I think that should be a fairly easy fix.
I think it is a good idea, as you have done, to put the name of the selected layer in the title bar of the viewer window. Can I suggest in addition, that you mark the selected tab by putting an asterisk in front of the layer name in the tab. This would work on all platforms.
Done. Thanks for the suggestion.
You asked about the greying-out feature. I think it is an unnecessary complication and it would be preferable to disable it.
I kind of agreed. The only caveat is that making a layer invisible will also cause the selected image to "disappear" from the mapview.
You also asked about the highlight colour for non-viewed images. Can I suggest dull red #C00000, by analogy with greying-out?
I didn't like #C00000. I used #320000.
by , 2 years ago
Attachment: | session_21605.zip added |
---|
comment:41 by , 2 years ago
Replying to taylor.smock:
I am keen to see others testing this with their use cases. It is likely that I will miss some bugs.
With the jar file of 2022-12-01, I am seeing the same as you, with a couple of exceptions.
First, the tabs do now seem to get populated even if you open the session file when there is already a layer in existence.
Second, some session files cannot be opened when there are no layers. The session files open just fine if there is already a layer in existence. The previous patched jars did not have this problem. The error is different depending on whether or not the image files are present. If the image files are not present:
Revision:18606 Is-Local-Build:true Build-Date:2022-12-01 08:23:00 Identification: JOSM/1.5 (18606 SVN en_GB) Mac OS X 11.7 OS Build number: macOS 11.7 (20G817) Memory Usage: 1894 MB / 4096 MB (601 MB allocated, but free) Java version: 18.0.2.1+1, Azul Systems, Inc., OpenJDK 64-Bit Server VM Look and Feel: com.apple.laf.AquaLookAndFeel Screen: Display 725375437 1920×1200 (scaling 1.00×1.00) Maximum Screen Size: 1920×1200 Best cursor sizes: 16×16→16×16, 32×32→32×32 Environment variable LANG: en_GB.UTF-8 System property file.encoding: UTF-8 System property sun.jnu.encoding: UTF-8 Locale info: en_GB Numbers with default locale: 1234567890 -> 1234567890 Plugins: + ImportImagePlugin (36013) + InfoMode (35978) + PicLayer (1.0.2) + apache-commons (36003) + cadastre-fr (36021) + editgpx (35931) + ejml (35924) + geotools (36028) + http2 (35921) + imagery_offset_db (35978) + jackson (36006) + jaxb (35952) + jts (36004) + log4j (36007) + measurement (35978) + opendata (36025) + photo_geotagging (35933) + poly (35976) + reverter (36011) + turnrestrictions (36011) + undelete (36011) + utilsplugin2 (36011) + waydownloader (36011) Last errors/warnings: - 02525.371 E: at org.openstreetmap.josm.actions.SessionLoadAction$Loader.realRun(SessionLoadAction.java:202) - 02525.371 E: at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:94) - 02525.371 E: at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:142) - 02525.372 E: at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) - 02525.372 E: at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) - 02525.372 E: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) - 02525.372 E: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) - 02525.372 E: at java.base/java.lang.Thread.run(Thread.java:833) - 02525.435 E: java.io.FileNotFoundException: /Volumes/Untitled/20190914/IMG_20190914_172915.JPG (No such file or directory) - 02525.458 E: Handled by bug report queue: java.lang.NullPointerException === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: AWT-EventQueue-0 (22) of main java.lang.NullPointerException at java.base/java.util.Objects.requireNonNull(Objects.java:208) at java.base/java.util.Optional.of(Optional.java:113) at org.openstreetmap.josm.gui.layer.geoimage.ImageViewerDialog.updateTitle(ImageViewerDialog.java:919) at org.openstreetmap.josm.gui.layer.geoimage.ImageViewerDialog.updateButtonsNonNullEntry(ImageViewerDialog.java:883) at org.openstreetmap.josm.gui.layer.geoimage.ImageViewerDialog.displayImages(ImageViewerDialog.java:814) at org.openstreetmap.josm.gui.layer.geoimage.GeoImageLayer.<init>(GeoImageLayer.java:201) at org.openstreetmap.josm.gui.layer.geoimage.GeoImageLayer.<init>(GeoImageLayer.java:177) at org.openstreetmap.josm.gui.layer.geoimage.GeoImageLayer.<init>(GeoImageLayer.java:165) at org.openstreetmap.josm.io.session.GeoImageSessionImporter.load(GeoImageSessionImporter.java:71) at org.openstreetmap.josm.io.session.SessionReader.parseJos(SessionReader.java:595) at org.openstreetmap.josm.io.session.SessionReader.loadSession(SessionReader.java:805) at org.openstreetmap.josm.io.session.SessionReader.loadSession(SessionReader.java:755) at org.openstreetmap.josm.actions.SessionLoadAction$Loader.realRun(SessionLoadAction.java:202) at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:94) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:142) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833)
If the image files are present:
Revision:18606 Is-Local-Build:true Build-Date:2022-12-01 08:23:00 Identification: JOSM/1.5 (18606 SVN en_GB) Mac OS X 11.7 OS Build number: macOS 11.7 (20G817) Memory Usage: 350 MB / 4096 MB (83 MB allocated, but free) Java version: 18.0.2.1+1, Azul Systems, Inc., OpenJDK 64-Bit Server VM Look and Feel: com.apple.laf.AquaLookAndFeel Screen: Display 725375437 1920×1200 (scaling 1.00×1.00) Maximum Screen Size: 1920×1200 Best cursor sizes: 16×16→16×16, 32×32→32×32 Environment variable LANG: en_GB.UTF-8 System property file.encoding: UTF-8 System property sun.jnu.encoding: UTF-8 Locale info: en_GB Numbers with default locale: 1234567890 -> 1234567890 Plugins: + ImportImagePlugin (36013) + InfoMode (35978) + PicLayer (1.0.2) + apache-commons (36003) + cadastre-fr (36021) + editgpx (35931) + ejml (35924) + geotools (36028) + http2 (35921) + imagery_offset_db (35978) + jackson (36006) + jaxb (35952) + jts (36004) + log4j (36007) + measurement (35978) + opendata (36025) + photo_geotagging (35933) + poly (35976) + reverter (36011) + turnrestrictions (36011) + undelete (36011) + utilsplugin2 (36011) + waydownloader (36011) Last errors/warnings: - 00283.247 E: at org.openstreetmap.josm.io.session.SessionReader.loadSession(SessionReader.java:755) - 00283.247 E: at org.openstreetmap.josm.actions.SessionLoadAction$Loader.realRun(SessionLoadAction.java:202) - 00283.247 E: at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:94) - 00283.247 E: at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:142) - 00283.248 E: at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) - 00283.248 E: at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) - 00283.248 E: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) - 00283.248 E: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) - 00283.249 E: at java.base/java.lang.Thread.run(Thread.java:833) - 00283.384 E: Handled by bug report queue: java.lang.NullPointerException === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: AWT-EventQueue-0 (22) of main java.lang.NullPointerException at java.base/java.util.Objects.requireNonNull(Objects.java:208) at java.base/java.util.Optional.of(Optional.java:113) at org.openstreetmap.josm.gui.layer.geoimage.ImageViewerDialog.updateTitle(ImageViewerDialog.java:919) at org.openstreetmap.josm.gui.layer.geoimage.ImageViewerDialog.updateButtonsNonNullEntry(ImageViewerDialog.java:883) at org.openstreetmap.josm.gui.layer.geoimage.ImageViewerDialog.displayImages(ImageViewerDialog.java:814) at org.openstreetmap.josm.gui.layer.geoimage.GeoImageLayer.<init>(GeoImageLayer.java:201) at org.openstreetmap.josm.gui.layer.geoimage.GeoImageLayer.<init>(GeoImageLayer.java:177) at org.openstreetmap.josm.gui.layer.geoimage.GeoImageLayer.<init>(GeoImageLayer.java:165) at org.openstreetmap.josm.io.session.GeoImageSessionImporter.load(GeoImageSessionImporter.java:71) at org.openstreetmap.josm.io.session.SessionReader.parseJos(SessionReader.java:595) at org.openstreetmap.josm.io.session.SessionReader.loadSession(SessionReader.java:805) at org.openstreetmap.josm.io.session.SessionReader.loadSession(SessionReader.java:755) at org.openstreetmap.josm.actions.SessionLoadAction$Loader.realRun(SessionLoadAction.java:202) at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:94) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:142) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833)
To reproduce: The attached session_21605.zip contains a jos (session) file and three gpx files.
- Save the gpx files on your computer.
- Use a text editor to change the paths in the jos file, to point to the gpx files.
- Launch JOSM, or delete all layers if JOSM is already running.
- Open the jos file.
- To test with images present, change the relevant file reference in the jos file, to point to any image you have to hand.
comment:42 by , 2 years ago
Sorry, do not have much time to test. On a quick test, I still have the problem with the too small height of the tabs. I changed the LaF fromMetal
to Gtk+
but that makes no difference. Mean-while all image layers seem to be added to the image viewer tabs but only the first layer has a selected image in mapview and all following image layer tabs are selectable but neither the image nor the window title does change.
Still think the best solution would be to always display (select) the first image of each layer (unless the selection is saved within the session) and hide hidden image layers from the tabs in image viewer.
comment:43 by , 2 years ago
Oh, starting with empty preferences the initial width of the image viewer dialog is back to only some px as with current tested (r18583) which is not the case with latest (r18606) as described in my comment 1 on #22521.
comment:44 by , 2 years ago
@Adrian: Thanks for the feedback and stack trace. I've fixed that.
@skyper: I'm adding a close button for the image viewer tabs.
by , 2 years ago
Attachment: | 21605.7.patch added |
---|
comment:45 by , 2 years ago
Absent additional (negative) feedback, I'm going to apply the patch Monday, December 12.
by , 2 years ago
Attachment: | josm_21605_button_in_pic.jpg added |
---|
button to close tab rendered onto of image
follow-up: 54 comment:46 by , 2 years ago
Thanks for the button and the trick with the extra text box for the tabs.
- This text box should be centered within the raised button:
- With only one layer, moving the mouse cursor over a specific area on the upper part of the image the close button is displayed onto of the image:
- closing all but the active layer the tab's text box is displayed onto of the image. Same is true when moving layers in layer toggle dialog. After some action inside the image viewer dialog the text box vanishes:
comment:47 by , 2 years ago
Oh one more enhancement I noticed. Switching between layers the zoom is always reset. It would be nice if the zoom and the position could be preserved.
follow-up: 49 comment:48 by , 2 years ago
I've fixed the text that is staying behind in some instances when closing the second to last image. That also fixes the sometimes invisible close button when there is only one tab open.
Oh one more enhancement I noticed. Switching between layers the zoom is always reset. It would be nice if the zoom and the position could be preserved.
I think that should be a separate ticket. I think I can do it fairly easily, but the patch is getting way too large.
comment:49 by , 2 years ago
Replying to taylor.smock:
I've fixed the text that is staying behind in some instances when closing the second to last image. That also fixes the sometimes invisible close button when there is only one tab open.
Thanks, is working now.
Oh one more enhancement I noticed. Switching between layers the zoom is always reset. It would be nice if the zoom and the position could be preserved.
I think that should be a separate ticket. I think I can do it fairly easily, but the patch is getting way too large.
See #22560.
comment:54 by , 2 years ago
comment:55 by , 2 years ago
I added some documentation: wiki:/Help/Dialog/ImageViewer?action=diff&version=19
Please enhance/correct if necessary.
comment:56 by , 2 years ago
Scroll through the tabs of different source layers with arrow keys
Does that actually work for you? It doesn't work for me. I don't recall adding shortcuts for scrolling through tabs (I should have), so this is probably platform specific behavior if it does work for you.
follow-up: 58 comment:57 by , 2 years ago
Yes that works for me (after setting the focus in the panel). In comment:50 you wrote "Tabs are now scrollable". So I tried with the mouse wheel, but that doesn't work for me.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2022-12-28 19:38:17 +0100 (Wed, 28 Dec 2022) Revision:18621 Build-Date:2022-12-29 02:30:57 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (18621 en) Windows 10 64-Bit OS Build number: Windows 10 Pro 2009 (19045) Memory Usage: 926 MB / 4058 MB (300 MB allocated, but free) Java version: 17.0.5+8-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel Screen: \Display0 2736×1824 (scaling 2.00×2.00) Maximum Screen Size: 2736×1824 Best cursor sizes: 16×16→64×64, 32×32→64×64 System property file.encoding: Cp1252 System property sun.jnu.encoding: Cp1252 Locale info: en_DE Numbers with default locale: 1234567890 -> 1234567890 VM arguments: [-Dicedtea-web.bin.location=%UserProfile%\AppData\Local\Programs\OpenWebStart\javaws, -Djava.util.Arrays.useLegacyMergeSort=true, --add-exports=jdk.deploy/com.sun.deploy.config=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-reads=java.naming=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.action=ALL-UNNAMED,java.desktop, --add-reads=java.base=ALL-UNNAMED,java.desktop, --add-exports=java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/sun.awt=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-exports=java.base/sun.security.validator=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, --add-exports=java.base/com.sun.net.ssl.internal.ssl=ALL-UNNAMED,java.desktop, --add-exports=javafx.graphics/com.sun.javafx.application=ALL-UNNAMED, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.desktop/sun.awt.X11=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,java.desktop,jdk.jsobject, --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED,java.desktop, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-exports=java.base/sun.security.util=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-reads=java.desktop=ALL-UNNAMED,java.naming, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-exports=java.base/sun.security.x509=ALL-UNNAMED,java.desktop, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-exports=java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.provider=ALL-UNNAMED,java.desktop] Dataset consistency test: No problems found
comment:58 by , 2 years ago
Replying to Klumbumbus:
Yes that works for me (after setting the focus in the panel). In comment:50 you wrote "Tabs are now scrollable". So I tried with the mouse wheel, but that doesn't work for me.
Huh. I don't remember doing anything with that. Maybe I forgot? Or maybe I was thinking I had fixed an issue from comment:15, and just poorly worded the commit message. I'm going to bet it was the latter, and it is just a happy coincidence that left/right arrows worked on your platform.
It should be doable to add a MouseWheelListener to the pane though, and actually make it mouse scrollwheel aware.
comment:59 by , 23 months ago
It works for me too on Debian, though, I might have to click onto a tab once to enable it.
I'm sorry to hear that :(
I'll check and see how feasible it will be to add tabs to the JOSM image viewer window. Not exactly what you are asking for (separate windows), but it should be the best option forward.