[josm-dev] Progress monitor not being closed

Marián Kyral mkyral at email.cz
Tue Apr 15 09:55:55 UTC 2014


Hi,
I've the same problem in my pointInfo plugin:
https://github.com/mkyral/josm-pointInfo/blob/master/src/org/openstreetmap/
josm/plugins/pointinfo/PointInfoAction.java#L93
(https://github.com/mkyral/josm-pointInfo/blob/master/src/org/openstreetmap/josm/plugins/pointinfo/PointInfoAction.java#L93)

I've tried many thinks, but the progress monitor dialog is still shown on 
background, when I'm showing the result. It only disappear when I destroy 
the result window. I'm not able to close the progress monitor dialog nor at 
least hide it.

I think, there some should be some method like "destroy", "close" or "hide" 
implemented.

Marián


---------- Původní zpráva ----------
Od: Toby Murray <toby.murray at gmail.com>
Komu: josm-dev <josm-dev at openstreetmap.org>
Datum: 14. 4. 2014 21:12:34
Předmět: [josm-dev] Progress monitor not being closed

"I'm working on the notes plugin some more and have run into a problem with
ProgressMonitor. I am able to make a PleaseWaitProgressMonitor pop up on
the screen and even update the text being shown to the user. But when I
call finishTask the dialog does not close. It just stays on the screen
indefinitely. For testing I have simplified my function down to the
following which matches the suggested use in the ProgressMonitor interface:

public List<Note> searchNotes(<other params>, ProgressMonitor monitor) {
if(monitor == null) {
monitor = NullProgressMonitor.INSTANCE;
}
monitor.beginTask("Searching", 1);
monitor.worked(1);
monitor.finishTask();

I am passing in a PleaseWaitProgressMonitor that is created with the
default constructor. This happens in code that is already in GitHub:
https://github.com/iandees/josm-notes/blob/search-progress-bar/src/org/
openstreetmap/josm/plugins/notes/gui/action/SearchAction.java#L146

Any tips as to what could be going on here?

Thanks,
Toby
_______________________________________________
josm-dev mailing list
josm-dev at openstreetmap.org
https://lists.openstreetmap.org/listinfo/josm-dev"


More information about the josm-dev mailing list