mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-27 01:26:30 +00:00
CHANGED: #1471 Removing widgets from the widget properties dialog will now work.
--HG-- branch : gsoc2012-gui-editor
This commit is contained in:
parent
2cebadaa79
commit
f31af3d95b
3 changed files with 12 additions and 8 deletions
|
@ -62,10 +62,10 @@ namespace GUIEditor
|
|||
return true;
|
||||
}
|
||||
|
||||
/// Finds a node and removes it
|
||||
bool removeNode( SWidgetInfo *info )
|
||||
/// Finds a node by it's name and removes it
|
||||
bool removeNode( const std::string &name )
|
||||
{
|
||||
CWidgetInfoTreeNode *node = findNodeByName( info->name );
|
||||
CWidgetInfoTreeNode *node = findNodeByName( name );
|
||||
if( node == NULL )
|
||||
return false;
|
||||
|
||||
|
@ -78,6 +78,12 @@ namespace GUIEditor
|
|||
return true;
|
||||
}
|
||||
|
||||
/// Finds a node by it's info entry and removes it
|
||||
bool removeNode( SWidgetInfo *info )
|
||||
{
|
||||
return removeNode( info->name );
|
||||
}
|
||||
|
||||
/// Get the node names and put them into the vector
|
||||
void getNames( std::vector< std::string > &v ) const
|
||||
{
|
||||
|
|
|
@ -85,8 +85,8 @@ namespace GUIEditor
|
|||
{
|
||||
if( ( *itr )->getInfo().name == name )
|
||||
{
|
||||
children.erase( itr );
|
||||
delete ( *itr );
|
||||
children.erase( itr );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,10 +67,8 @@ namespace GUIEditor{
|
|||
if( reply != QMessageBox::Yes )
|
||||
return;
|
||||
|
||||
/*
|
||||
Remove the damned thing here
|
||||
*/
|
||||
|
||||
tree->removeNode( widgetName.toStdString() );
|
||||
widgetPropTree->clear();
|
||||
buildWidgetList();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue