Hi,

See https://josm.openstreetmap.de/ticket/12075.
The idea is to ask for confirmation if a GeoImageLayer with modified image properties is deleted. What is the best/right way to do that?

The AbstractModifiableLayer seems to serve that purpose. GeoImageLayer could extend AbstractModifiableLayer instead of Layer. But there is not a single file associated with the layer but one file per modified image. There is not really a "recommended action" for the SaveLayersDialog. The AbstractModifiableLayer would need to be extended to have something like isAbleToUploadToServer() and isAbleToSaveToFile() to disable the according check-boxes of the SaveLayersDialog. The logic in Main.saveUnsavedModifications() would need to be changed to consider the layer if neither requiresSaveToFile() nor requiresUploadToServer() returns true. Would it make sense to add something like requiresSomeAction() to AbstractModifiableLayer and Main.saveUnsavedModifications()? The "action" could be a string that is displayed in the SaveLayersDialog.

Thanks,
Holger

_______________________________________________
josm-dev mailing list
josm-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/josm-dev

Reply via email to