OSDN Git Service

Correct problem where child tag custom icons are not displayed.
authorRandy Baumgarte <randy@fbn.cx>
Mon, 3 Jan 2011 16:40:58 +0000 (11:40 -0500)
committerRandy Baumgarte <randy@fbn.cx>
Mon, 10 Jan 2011 01:14:39 +0000 (20:14 -0500)
src/cx/fbn/nevernote/gui/TagTreeWidget.java

index 086838d..ccee2a8 100644 (file)
@@ -187,6 +187,11 @@ public class TagTreeWidget extends QTreeWidget {
                                        child.setIcon(0, icon);\r
                                        child.setText(2, tag.getGuid());\r
                                        child.setTextAlignment(1, ra.value());\r
+                                       if (icons != null && !icons.containsKey(tag.getGuid())) {\r
+                                               child.setIcon(0, findDefaultIcon(tag.getGuid()));\r
+                                       } else {\r
+                                               child.setIcon(0, icons.get(tag.getGuid()));\r
+                                       }\r
                                        tempList.remove(i);\r
                                        index.add(child);                                               \r
                                        index.get(j).addChild(child);\r