Changeset 2954


Ignore:
Timestamp:
07/10/07 09:35:16 (13 years ago)
Author:
curtis
Message:
  • Do not reload preview thumbnail if another used file is selected
  • Assign names to new threads
Location:
trunk/loci/formats/gui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/gui/DataConverter.java

    r2857 r2954  
    367367      cLabel.setText(label); 
    368368    } 
    369     else if ("convert".equals(cmd)) new Thread(this).start(); 
     369    else if ("convert".equals(cmd)) new Thread(this, "Converter").start(); 
    370370    else if ("force".equals(cmd)) { 
    371371      force = forceType.isSelected(); 
     
    373373    else if ("quit".equals(cmd)) { 
    374374      shutdown = true; 
    375       new Thread() { 
     375      new Thread("Quitter") { 
    376376        public void run() { dispose(); } 
    377377      }.start(); 
  • trunk/loci/formats/gui/ImageViewer.java

    r2857 r2954  
    346346        final File file = chooser.getSelectedFile(); 
    347347        if (file != null) { 
    348           new Thread() { 
     348          new Thread("ImageViewer-Opener") { 
    349349            public void run() { open(file.getAbsolutePath()); } 
    350350          }.start(); 
     
    360360        final File file = chooser.getSelectedFile(); 
    361361        if (file != null) { 
    362           new Thread() { 
     362          new Thread("ImageViewer-Saver") { 
    363363            public void run() { save(file.getPath()); } 
    364364          }.start(); 
  • trunk/loci/formats/gui/PreviewPane.java

    r2884 r2954  
    9797      // start separate loader thread 
    9898      loaderAlive = true; 
    99       loader = new Thread(this); 
     99      loader = new Thread(this, "Preview"); 
    100100      loader.start(); 
    101101    } 
     
    141141      String id = loadId; 
    142142      if (id == lastId) continue; 
     143      if (id != null && lastId != null) { 
     144        String[] files = reader.getUsedFiles(); 
     145        boolean found = false; 
     146        for (int i=0; i<files.length; i++) { 
     147          if (id.equals(files[i])) { 
     148            found = true; 
     149            break; 
     150          } 
     151        } 
     152        if (found) continue; 
     153      } 
    143154      lastId = id; 
    144155 
     
    154165        LogTools.trace(exc); 
    155166        resLabel.setText("Unsupported"); 
    156         zctLabel.setText("format"); 
     167        boolean badFormat = exc.getMessage().startsWith("Unknown file format"); 
     168        zctLabel.setText(badFormat ? "format" : "file"); 
    157169        continue; 
    158170      } 
     
    160172        LogTools.trace(exc); 
    161173        resLabel.setText("Unsupported"); 
    162         zctLabel.setText("format"); 
     174        zctLabel.setText("file"); 
    163175        continue; 
    164176      } 
Note: See TracChangeset for help on using the changeset viewer.