Revision 47338 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.xml2db/org.gvsig.xml2db.swing/org.gvsig.xml2db.swing.impl/src/main/java/org/gvsig/xml2db/swing/impl/createdbfromxml/CreatedbFromXmlPanel.java

View differences:

CreatedbFromXmlPanel.java
183 183
                this.txtProjection, 
184 184
                this.btnProjection
185 185
        );
186
        this.pickerProjection.addChangeListener((ChangeEvent e) -> {
187
            setTablesModel(null);
188
        });
186 189
        
187 190
        this.pickerDbfile = toolsSwingManager.createFilePickerController(
188 191
                this.txtDatabaseFile, 
......
214 217
        
215 218
        this.pickerLocale = toolsSwingManager.createLocalePickerController(this.cboLocale);
216 219
        this.pickerLocale.set(Locale.getDefault());
220
        this.pickerLocale.addChangeListener((ChangeEvent e) -> {
221
            setTablesModel(null);
222
        });
217 223
        
218 224
        SwingUtilities.invokeLater(() -> { updateStateComponents(); });
219 225
        
......
291 297
            }
292 298
            return;
293 299
        }
300
        
301
        if( this.xmlinfo!=null && this.xmlinfo.hasGeometries() && this.pickerProjection.get()==null ) {
302
            this.message("_Projection_is_required", JOptionPane.WARNING_MESSAGE);
303
            if( this.dialog!=null ) {
304
                this.dialog.setButtonEnabled(WindowManager_v2.BUTTON_OK, false);
305
            }
306
            return;
307
        }
308
        
294 309
        this.lstTables.setEnabled(true);
295 310
        this.btnViewTableStructure.setEnabled(true);
296 311
        File dbfile = this.pickerDbfile.get();
......
424 439
            protected void task(SimpleTaskStatus taskStatus) throws Throwable{
425 440
                try {
426 441
                    XMLInfo xmlinfo = manager.extractStructure(xmlfile, charset, proj, locale, taskStatus);
427
                    setTablesModel(xmlinfo);
428 442
                    if( proj==null && xmlinfo.getSrid()!=null ) {
429 443
                        pickerProjection.set(xmlinfo.getSrid());
430 444
                    }
431 445
                    if( xmlinfo.getCharset()!=null && charset==null ) {
432 446
                        pickerCharset.set(xmlinfo.getCharset());
433 447
                    }
448
                    setTablesModel(xmlinfo);
434 449
                } catch(Throwable ex) {
435 450
                    LOGGER.warn("Can't analize xml",ex);
436 451
                    setTablesModel(null);

Also available in: Unified diff