Modify ↓
#13023 closed enhancement (fixed)
[Patch] Replace uses of hasEditLayer() with new layer manager.
| Reported by: | michael2402 | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | 16.06 |
| Component: | Core | Version: | |
| Keywords: | gsoc-core | Cc: | Don-vip, bastiK, stoecker |
Description
Replace uses of old Main.hasEditLayer with layer manager.
The layer manager does not provide a hasEditLayer method. You can use an != null check here. In most cases where this was used you want to work with the edit layer directly afterwards, so you can simply get it and check if it is not null.
Attachments (1)
Change History (5)
by , 9 years ago
| Attachment: | patch-layer-manager-has-edit-layer.patch added |
|---|
comment:2 by , 9 years ago
| Milestone: | → 16.06 |
|---|
comment:4 by , 9 years ago
I know. Those were the ones I want to investigate further if they are required or can be replaced by a better solution.
Note:
See TracTickets
for help on using tickets.



Still 4 warnings:
[javac] C:\SVN\josm\core\src\org\openstreetmap\josm\gui\dialogs\RelationListDialog.java:341: warning: [deprecation] hasEditLayer() in Main has been deprecated [javac] if (!Main.main.hasEditLayer()) return; [javac] ^ [javac] C:\SVN\josm\core\src\org\openstreetmap\josm\gui\tagging\presets\TaggingPresetSearchAction.java:32: warning: [deprecation] hasEditLayer() in Main has been deprecated [javac] if (!Main.main.hasEditLayer()) [javac] ^ [javac] C:\SVN\josm\core\src\org\openstreetmap\josm\gui\tagging\presets\TaggingPresetSearchPrimitiveDialog.java:47: warning: [deprecation] hasEditLayer() in Main has been deprecated [javac] if (Main.main.hasEditLayer()) { [javac] ^ [javac] C:\SVN\josm\core\src\org\openstreetmap\josm\gui\dialogs\CommandStackDialog.java:271: warning: [deprecation] hasEditLayer() in Main has been deprecated [javac] if (!Main.main.hasEditLayer()) [javac] ^