105 |
105 |
106 for (Primitive& prim : cat.prims) { |
106 for (Primitive& prim : cat.prims) { |
107 SubfileListItem* item = new SubfileListItem (parentItem, &prim); |
107 SubfileListItem* item = new SubfileListItem (parentItem, &prim); |
108 item->setText (0, fmt ("%1 - %2", prim.name, prim.title)); |
108 item->setText (0, fmt ("%1 - %2", prim.name, prim.title)); |
109 subfileItems << item; |
109 subfileItems << item; |
|
110 |
|
111 // If this primitive is the one the current object points to, |
|
112 // select it by default |
|
113 if (obj && static_cast<LDSubfile*> (obj)->fileInfo ()->name () == prim.name) |
|
114 tw_subfileList->setCurrentItem (item); |
110 } |
115 } |
111 |
116 |
112 tw_subfileList->addTopLevelItem (parentItem); |
117 tw_subfileList->addTopLevelItem (parentItem); |
113 } |
118 } |
114 |
119 |