Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#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)

patch-layer-manager-has-edit-layer.patch (18.7 KB ) - added by michael2402 9 years ago.

Download all attachments as: .zip

Change History (5)

by michael2402, 9 years ago

comment:1 by Don-vip, 9 years ago

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]                       ^
Last edited 9 years ago by Don-vip (previous) (diff)

comment:2 by Don-vip, 9 years ago

Milestone: 16.06

comment:3 by Don-vip, 9 years ago

Resolution: fixed
Status: newclosed

In 10453/josm:

fix #13023 - Replace uses of hasEditLayer() with new layer manager (patch by michael2402, modified) - gsoc-core

comment:4 by michael2402, 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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
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.