Changeset 2740


Ignore:
Timestamp:
05/03/07 16:09:29 (13 years ago)
Author:
melissa
Message:

Fixed possible NPE in OMEWriter; fixed OME upload plugin to respect canceled dialogs.

Location:
trunk/loci
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/ome/OMEWriter.java

    r2712 r2740  
    280280  /* @see loci.formats.IFormatHandler#close() */ 
    281281  public void close() throws IOException { 
    282     rc.logout(); 
     282    if (rc != null) rc.logout(); 
    283283    pixelsId = -1; 
    284284    validLogin = false; 
  • trunk/loci/plugins/LociUploader.java

    r2725 r2740  
    4949  private String user; 
    5050  private String pass; 
     51  private boolean canceled = false; 
    5152 
    5253  // -- PlugIn API methods -- 
     
    6263 
    6364    promptForLogin(); 
     65    if (canceled) { 
     66      canceled = false; 
     67      return; 
     68    } 
     69     
    6470    uploadStack(); 
    6571  } 
     
    7682    ((TextField) prompt.getStringFields().get(2)).setEchoChar('*'); 
    7783    prompt.showDialog(); 
     84 
     85    if (prompt.wasCanceled()) { 
     86      canceled = true; 
     87      return; 
     88    } 
    7889 
    7990    server = prompt.getNextString(); 
Note: See TracChangeset for help on using the changeset viewer.