Revision 3226 org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.swing/org.gvsig.vectorediting.swing.impl/src/main/java/org/gvsig/vectorediting/swing/impl/DefaultEditingContext.java

View differences:

DefaultEditingContext.java
148 148
    private Set<FLyrVect> layersSpatialCacheEnabled = new HashSet<>();
149 149
    
150 150
    private boolean processing;
151
    
152
    private int drawMode;
151 153

  
152 154
    private final LayerListener layerListener = new LayerListener() {
153 155

  
......
299 301
        this.observableHelper = new ObservableHelper();
300 302

  
301 303
        this.serviceStack = new Stack<>();
304
        
305
        this.drawMode = DRAWMODE_NORMAL;
302 306

  
303 307
        addLayerListeners();
304 308
        addPreferenceListener();
......
351 355

  
352 356
                    try {
353 357
                        service.activate();
354
                        service.start();                       
358
                        service.start();
359
                        setDrawMode(DRAWMODE_NORMAL);
355 360
                    } catch (StartServiceException e) {
356 361

  
357 362
                        LOGGER.info(String.format(
......
818 823
                    setActiveService(lastService);
819 824
//                lastService.start();
820 825
                    lastService.restart();
826
                    setDrawMode(DRAWMODE_NORMAL);
821 827
                    changeSelectedTool(getActiveService().getName());
822 828
                }
823 829

  
......
1480 1486
            lastNoBusyCursor = null;
1481 1487
        }
1482 1488
    }
1489

  
1490
    @Override
1491
    public int getDrawMode() {
1492
        return this.drawMode;
1493
    }
1494

  
1495
    @Override
1496
    public void setDrawMode(int mode) {
1497
        this.drawMode = mode;
1498
        refreshMenusAndToolBars();
1499
    }
1483 1500
}

Also available in: Unified diff