Changeset 6173


Ignore:
Timestamp:
2003-12-08T17:05:42+13:00 (20 years ago)
Author:
jmt12
Message:

Changed the test for refreshing the tool pane card layout so it is only validated when the model builder isn't running

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gui/MetaEditPane.java

    r6160 r6173  
    651651     */
    652652    private void validateControls() {
     653    validateControls(false);
     654    }
     655
     656    private void validateControls(boolean update_card) {
    653657    validateMetadataTable();
    654658    // Validate card_layout_2
    655     if (selected_metadata != null) {
    656         card_layout2.show(control_pane, TOOLS_ON);
    657     }
    658     else {
    659         card_layout2.show(control_pane, TOOLS_OFF);
     659    // We only ever change tools if the metadata table has finished building or is empty.
     660    if(update_card) {
     661        if (selected_metadata == null && model.isBuildingComplete() && model.getRowCount() == 0) {
     662        card_layout2.show(control_pane, TOOLS_OFF);
     663        }
     664        else {
     665        card_layout2.show(control_pane, TOOLS_ON);
     666        }
    660667    }
    661668
     
    735742        }
    736743        }
    737         validateControls();
     744        validateControls(true);
    738745    }
    739746    }
     
    14171424
    14181425            // Update the status of the buttons
    1419             validateControls();
     1426            validateControls(); // Don't update the tools view itself
    14201427        }
    14211428        }
Note: See TracChangeset for help on using the changeset viewer.