Changeset 6028


Ignore:
Timestamp:
2003-11-28T17:40:04+13:00 (20 years ago)
Author:
jmt12
Message:

The first row of the table is now selected when you enter enrich view

File:
1 edited

Legend:

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

    r5989 r6028  
    167167    {
    168168    // If there is no builder or no data then there is no point...
    169     if (builder == null || metadatum == null) {
     169    if (builder == null) {
    170170        return;
    171171    }
     
    177177    // Otherwise, select the appropriate row in the table
    178178    else {
     179
     180        // If there was no previous metadata, select the first row (if any)
     181        if(metadatum == null) {
     182        if(current_metadata.size() > 0) {
     183            // We have to put the selection task onto the AWT thread
     184            SelectionTask task = new SelectionTask(0);
     185            SwingUtilities.invokeLater(task);
     186            task = null;
     187        }
     188        return;
     189        }
     190
    179191        // Find the position in the list where the piece of metadata should be
    180192        Comparator metadata_comparator = MSMUtils.METADATA_COMPARATOR;
     
    398410            selectMetadataWhenBuildingComplete(select_exact_metadata);
    399411        }
    400         else if (select_closest_metadata != null) {
     412        else {
    401413            selectClosestMetadataWhenBuildingComplete(select_closest_metadata);
    402414        }
Note: See TracChangeset for help on using the changeset viewer.