Revision 3459 org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/java/org/gvsig/vcsgis/swing/impl/changes/LocalChangesController.java

View differences:

LocalChangesController.java
88 88
import static org.gvsig.vcsgis.swing.impl.VCSGisSwingCommons.cleanHighligthed;
89 89
import static org.gvsig.vcsgis.swing.impl.VCSGisSwingCommons.notInSwingThreadInvokeLater;
90 90
import static org.gvsig.vcsgis.swing.impl.VCSGisSwingCommons.refreshDocument;
91
import static org.gvsig.vcsgis.swing.impl.VCSGisSwingCommons.showAuthenticationsErrors;
92 91
import org.slf4j.Logger;
93 92
import org.slf4j.LoggerFactory;
93
import static org.gvsig.vcsgis.swing.impl.VCSGisSwingCommons.showAuthenticationErrors;
94
import static org.gvsig.vcsgis.swing.impl.VCSGisSwingCommons.showAuthenticationErrors;
95
import static org.gvsig.vcsgis.swing.impl.VCSGisSwingCommons.showAuthenticationErrors;
94 96

  
95 97
/**
96 98
 *
......
209 211
        this.btnLocalCenter.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
210 212
        this.btnLocalCleanHighlighted.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
211 213
        
212
        this.workspacePicker.addChangeListener((ChangeEvent e) -> {
213
            doChangeWorkspace();
214
        });
215
        
216 214
        this.btnLocalCheckAllEntities.addActionListener((ActionEvent e) -> {
217 215
            this.entitySelector.checkAll();
218 216
        });
......
314 312
        context.doUpdateComponents();
315 313
    }
316 314

  
317
    private void doChangeWorkspace() {
318
        try {
319
            doReloadTables();
320
            doUpdateTableLocalChanges();
321
//          doReloadRepositoryEntities();
322
        } catch (VCSGisRuntimeException e1) {
323
            LOGGER.warn("Can't set workspace.", e1);
324
            if (showAuthenticationsErrors("_VCS_Changes", e1)) {
325
                this.workspacePicker.set(null);
326
                doChangeWorkspace();
327
            }
328
        } catch (Exception e2) {
329
            LOGGER.warn("Can't set workspace.", e2);
330
        }
315
    public void doChangeWorkspace() {
316
        doReloadTables();
317
        doUpdateTableLocalChanges();
331 318
    }
332 319
    
333 320
    private void translate() {
......
562 549
            this.btnLocalCleanHighlighted.setEnabled(!context.processing);
563 550
        } catch (VCSGisRuntimeException e1) {
564 551
            LOGGER.warn("Can't updating components.", e1);
565
            if (showAuthenticationsErrors("_VCS_Changes", e1)) {
552
            if (showAuthenticationErrors("_VCS_Changes", e1)) {
566 553
                this.workspacePicker.set(null);
567 554
                doChangeWorkspace();
568 555
            }
......
750 737
        if (notInSwingThreadInvokeLater(() -> {doPostCommit(commitStatus);})) {
751 738
            return;
752 739
        }
753
        if( commitStatus ==ERR_OK) {
740
        if( commitStatus == ERR_OK) {
754 741
            this.context.setVisibleStatus(false);
742
        } else {
743
            showAuthenticationErrors("_VCS_Commit", commitStatus);
755 744
        }
756
//        doReloadTables();
757 745
        context.updateLocalChangesTable();
758 746
    }
759 747

  

Also available in: Unified diff