Revision 5795 org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.app/org.gvsig.vcsgis.app.mainplugin/src/main/java/org/gvsig/vcsgis/app/addlayer/WizardVCSGisVectorial.java

View differences:

WizardVCSGisVectorial.java
150 150
                if( addToCWhenLoadingAll ) {
151 151
                    SwingUtilities.invokeLater(() -> {
152 152
                        layers.updateMapControl(mapControl, maintainStructureInToC(), false);
153
                        layers.disposeLayers();
153 154
                    });
155
                } else {
156
                    SwingUtilities.invokeLater(() -> {
157
                        layers.disposeLayers();
158
                    });
154 159
                }
155 160
                taskstatus.terminate();
156 161
            } finally {
157 162
                // Dispose all created layers. If they have been included into
158 163
                // a FLayers object, they will have been binded there.
159
                for (FLayer layer : layers) {
160
                    layer.dispose();
161
                }
164
//                for (FLayer layer : layers) {
165
//                    layer.dispose();
166
//                }
162 167
            }
163 168
        }, "WizardVCSGisVectorial");
164 169
        th.start();

Also available in: Unified diff