Changeset 18199 for gli/trunk


Ignore:
Timestamp:
2008-12-15T09:24:03+13:00 (16 years ago)
Author:
kjdon
Message:

a fix provided by John from Dl Consulting. File->Save now saves the metadata in the Enrich Pane as well as the collection config file. Previously, metadata was only saved when you left the pane.

Location:
gli/trunk/src/org/greenstone/gatherer/gui
Files:
2 edited

Legend:

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

    r13801 r18199  
    259259
    260260
    261     /** Called whenever the collection tree selection changes. This causes the metadata value table to be rebuilt. */
    262     public void valueChanged(TreeSelectionEvent event)
     261  /** Allows other classes to request the enrich pane to prepare for metadata
     262   *  saving.
     263   *  @author John Thompson, DL Consulting Ltd
     264   */
     265  public void stopEditingAndRebuild()
     266  {
     267    // Update the metadata value table (and consequently, the metadata value tree)
     268    metadata_value_table_pane.stopEditingAndRebuild(file_nodes);
     269  }
     270  /** stopEditingAndRebuild() **/
     271 
     272  /** Called whenever the collection tree selection changes. This causes the metadata value table to be rebuilt. */
     273  public void valueChanged(TreeSelectionEvent event)
    263274    {
    264275    // If we haven't got focus then it must have been a selection in the Gather pane, so don't bother rebuilding
  • gli/trunk/src/org/greenstone/gatherer/gui/GUIManager.java

    r17916 r18199  
    6060import org.greenstone.gatherer.gui.tree.DragTree;
    6161import org.greenstone.gatherer.metadata.MetadataSet;
     62import org.greenstone.gatherer.metadata.MetadataXMLFileManager;
    6263import org.greenstone.gatherer.remote.RemoteGreenstoneServer;
    6364import org.greenstone.gatherer.util.JarTools;
     
    203204    }
    204205    else if (esrc == menu_bar.file_save) {
    205         Gatherer.c_man.saveCollection();
     206      // Very important: make sure metadata values are saved too
     207      enrich_pane.stopEditingAndRebuild();
     208      // Make sure all the metadata has been saved to file
     209      MetadataXMLFileManager.saveMetadataXMLFiles();
     210     
     211      Gatherer.c_man.saveCollection();
    206212    }
    207213
Note: See TracChangeset for help on using the changeset viewer.