Changeset 24424

Show
Ignore:
Timestamp:
18.08.2011 18:06:42 (8 years ago)
Author:
ak19
Message:

The preview button was becoming enabled if the user clicked on a GS3 format statement even when the collection is still unbuilt. So it no longer enables the preview button if the collection is unbuilt.

Files:
1 modified

Legend:

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

    r18370 r24424  
    120120    } 
    121121    public static void setPreviewButton (boolean ready_to_preview) { 
     122    // if we're asked to enable the preview button, yet the collection is still 
     123    // unbuilt (as could happen when someone clicks on a format statement before  
     124    // building the collection), then shouldn't enable previewing. 
     125    if(ready_to_preview && !Gatherer.c_man.built()) { 
     126        ready_to_preview = false; 
     127    } 
    122128        preview_button.setEnabled (ready_to_preview); 
    123129    }