Gui: [skip ci] implement function to rename parameter group

This commit is contained in:
wmayer
2020-05-01 22:47:30 +02:00
parent 6306dc0276
commit d5d16de06b
3 changed files with 28 additions and 6 deletions

View File

@@ -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;
}
}