Changeset 4551


Ignore:
Timestamp:
2003-06-11T12:15:25+12:00 (21 years ago)
Author:
mdewsnip
Message:

Fixed a bug where a new OptionsPane was being created whenever a collection was built, causing a NPE because the log list starts off null. Now a new OptionsPane is only created for a new collection.

File:
1 edited

Legend:

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

    r4367 r4551  
    8888    /** A card layout is used to store the separate configuration and progress panes. */
    8989    private CardLayout card_layout = null;
     90    /** Stores a reference to the current collection. */
     91    private Collection previous_collection = null;
    9092    /** This monitor tracks the build processes progress. */
    9193    private GShellProgressMonitor build_monitor = null;
     
    219221        this.options_pane.resetLogList(); // saves any residual message
    220222        }
    221         this.options_pane = new OptionsPane(message_log, Gatherer.c_man.getCollection().build_options);
     223        Collection current_collection = Gatherer.c_man.getCollection();
     224        if (current_collection != previous_collection) {
     225        this.options_pane = new OptionsPane(message_log, current_collection.build_options);
     226        previous_collection = current_collection;
     227        }
    222228        tree.valueChanged(null);
    223229    }
Note: See TracChangeset for help on using the changeset viewer.