--- a/src/addObjectDialog.cpp Sun Feb 14 03:19:28 2016 +0200 +++ b/src/addObjectDialog.cpp Tue Feb 16 00:59:50 2016 +0200 @@ -95,8 +95,13 @@ coordCount = 3; tw_subfileList = new QTreeWidget(); tw_subfileList->setHeaderLabel (tr ("Primitives")); - populatePrimitivesTree (tw_subfileList, - (obj ? static_cast<LDSubfileReference*> (obj)->fileInfo()->name() : "")); + + QString defaultname; + + if (obj) + defaultname = static_cast<LDSubfileReference*> (obj)->fileInfo()->name(); + + g_win->primitives()->populateTreeWidget(tw_subfileList, defaultname); connect (tw_subfileList, SIGNAL (itemSelectionChanged()), this, SLOT (slot_subfileTypeChanged())); lb_subfileName = new QLabel ("File:"); le_subfileName = new QLineEdit;