Ignore:
Timestamp:
2004-11-09T13:54:52+13:00 (19 years ago)
Author:
mdewsnip
Message:

Started off fixing a bug where the loaded collection wasn't being ticked on in the cross-collection searching page. Ended up removing a ton of stuff from the CheckList class, some of which was duplicated code and buggy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/cdm/IndexManager.java

    r8381 r8496  
    576576        JLabel source_label = new JLabel();
    577577        Dictionary.registerText(source_label, "CDM.IndexManager.Source");
    578         source_list = new CheckList(new_data, false);
     578        source_list = new CheckList(false);
     579        source_list.setListData(new_data);
    579580        Dictionary.registerTooltip(source_list, "CDM.IndexManager.Source_Tooltip");
    580581
     
    696697        new_data.addAll(MetadataSetManager.getEveryMetadataSetElement());
    697698        // reset the model in the list and combobox
    698         source_list.setListData(new_data.toArray());
     699        source_list.setListData(new_data);
    699700        new_data = null;
    700701        // refresh the indexList
     
    742743        }
    743744        // Can't add a new index if no sources are selected
    744         else if(source_list.isSelectionEmpty()) {
     745        else if (source_list.getSelected().size() == 0) {
    745746        add_enabled = false;
    746747        }
     
    795796        public void actionPerformed(ActionEvent event) {
    796797        String name = name_textfield.getText();
    797         if(!source_list.isSelectionEmpty() && name.length() != 0) {
     798        if (source_list.getSelected().size() > 0 && name.length() != 0) {
    798799            ArrayList sources = source_list.getSelected();
    799800            Index index = new Index(level_combobox.getSelectedIndex(), sources);
Note: See TracChangeset for help on using the changeset viewer.