Gui: [skip ci] implement function to rename parameter group
This commit is contained in:
@@ -984,10 +984,8 @@ void ParameterGroupItem::setData ( int column, int role, const QVariant & value
|
||||
else
|
||||
{
|
||||
// rename the group by adding a new group, copy the content and remove the old group
|
||||
Base::Reference<ParameterGrp> hOldGrp = item->_hcGrp->GetGroup( oldName.toLatin1() );
|
||||
Base::Reference<ParameterGrp> hNewGrp = item->_hcGrp->GetGroup( newName.toLatin1() );
|
||||
hOldGrp->copyTo( hNewGrp );
|
||||
item->_hcGrp->RemoveGrp( oldName.toLatin1() );
|
||||
if (!item->_hcGrp->RenameGrp(oldName.toLatin1(), newName.toLatin1()))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user