|
|
@ -269,21 +269,16 @@ namespace GUIEditor
|
|
|
|
if( ( newParent == NULL ) || ( item == NULL ) )
|
|
|
|
if( ( newParent == NULL ) || ( item == NULL ) )
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
// Remove old item
|
|
|
|
// Remove item from old parent
|
|
|
|
QTreeWidgetItem *p = item->parent();
|
|
|
|
QTreeWidgetItem *p = item->parent();
|
|
|
|
if( p != NULL )
|
|
|
|
if( p != NULL )
|
|
|
|
p->setExpanded( false );
|
|
|
|
p->setExpanded( false );
|
|
|
|
id = item->data( 0, Qt::DisplayRole ).toString();
|
|
|
|
p->removeChild( item );
|
|
|
|
delete item;
|
|
|
|
|
|
|
|
item = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Remove reference to old item
|
|
|
|
// Remove reference to old item
|
|
|
|
widgetHierarchyMap.erase( oldid );
|
|
|
|
widgetHierarchyMap.erase( oldid );
|
|
|
|
|
|
|
|
|
|
|
|
// Add new item
|
|
|
|
// Add item to new parent
|
|
|
|
item = new QTreeWidgetItem();
|
|
|
|
|
|
|
|
item->setData( 0, Qt::DisplayRole, id );
|
|
|
|
|
|
|
|
item->setSelected( true );
|
|
|
|
|
|
|
|
newParent->addChild( item );
|
|
|
|
newParent->addChild( item );
|
|
|
|
|
|
|
|
|
|
|
|
// Add reference to new item
|
|
|
|
// Add reference to new item
|
|
|
|