Project

General

Profile

Bug #2446

ICONS: Handle missing thumbnails elegantly

Added by Matthew Brooke over 12 years ago. Updated over 9 years ago.

Status:
New
Priority:
Normal
Category:
interface
Target version:
Start date:
05/26/2006
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
2446

Description

If an actor's SVG icon does not have a corresponding 16x16 raster thumbnail icon in kepler/lib/images/actorthunbs, or if the SVG and raster base-names do not match exactly (mayeb a typo or case difference), then the actor library/ontology tree will have a blank icon for that actor. The problem is that this causes the tree to behave oddly - first time the user opens it, it springs back closed again. The second and subsequent times, it opens OK and shows the actor with no thumbnail icon.

There are 2 possible fixes:

1) Look at the code in kepler/src/exp/ptolemy/vergil/icon/XMLIcon.java, and change the code to assign a default blank icon if the thumbnail does not successfully get read from disk (start by looking at the createIcon() method), or

2) change the tree code so it doesn't spring closed the first time such a blank icon is displayed (mayeb start by looking at kepler/src/org/kepler/gui/AnnotatedPTree.java)

My recommendation would be to implement option (2), since that would immediately show that there is a problem (missing or mis-spelled icon), whilst not affecting the software. Option (1) would fix the odd tree behavior, but might mean that the missing/mis-spelled icon goes undetected.

A hybrid option might be to do (1), but assign a custom "error" icon if the regular icon cannot be found - a transparent one (so it appears blank, but doesn't mess up the tree), or maybe a red one that will be immediately noticeable.

History

#1 Updated by Redmine Admin over 5 years ago

Original Bugzilla ID was 2446

Also available in: Atom PDF