Ignore:
Timestamp:
2017-08-28T19:26:47+02:00 (7 years ago)
Author:
Don-vip
Message:

see #15182 - introduce Main.getEditDataSet to avoid unneeded GUI dependence in validator tests and tagging presets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/UndoRedoHandler.java

    r12636 r12691  
    8686     */
    8787    public synchronized void add(final Command c) {
    88         DataSet ds = Optional.ofNullable(c.getAffectedDataSet()).orElseGet(() -> MainApplication.getLayerManager().getEditDataSet());
     88        DataSet ds = Optional.ofNullable(c.getAffectedDataSet()).orElseGet(() -> Main.main.getEditDataSet());
    8989        Collection<? extends OsmPrimitive> oldSelection = null;
    9090        if (ds != null) {
     
    115115        if (commands.isEmpty())
    116116            return;
    117         DataSet ds = MainApplication.getLayerManager().getEditDataSet();
     117        DataSet ds = Main.main.getEditDataSet();
    118118        Collection<? extends OsmPrimitive> oldSelection = null;
    119119        if (ds != null) {
     
    156156        if (redoCommands.isEmpty())
    157157            return;
    158         DataSet ds = MainApplication.getLayerManager().getEditDataSet();
     158        DataSet ds = Main.main.getEditDataSet();
    159159        Collection<? extends OsmPrimitive> oldSelection = ds.getSelected();
    160160        for (int i = 0; i < num; ++i) {
Note: See TracChangeset for help on using the changeset viewer.