mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
Implemented remove button.
--HG-- branch : dfighter-tools
This commit is contained in:
parent
73a2b9bc90
commit
ec8a7522b2
1 changed files with 17 additions and 0 deletions
|
@ -59,6 +59,23 @@ void GeorgesTypDialog::onAddClicked()
|
|||
|
||||
void GeorgesTypDialog::onRemoveClicked()
|
||||
{
|
||||
QTreeWidgetItem *item = m_ui.tree->currentItem();
|
||||
if( item == NULL )
|
||||
return;
|
||||
|
||||
int i = 0;
|
||||
for( i = 0; i < m_ui.tree->topLevelItemCount(); i++ )
|
||||
{
|
||||
if( item == m_ui.tree->topLevelItem( i ) )
|
||||
break;
|
||||
}
|
||||
|
||||
m_ui.tree->takeTopLevelItem( i );
|
||||
delete item;
|
||||
|
||||
std::vector< NLGEORGES::CType::CDefinition >::iterator itr = m_pvt->typ->Definitions.begin() + i;
|
||||
m_pvt->typ->Definitions.erase( itr );
|
||||
|
||||
}
|
||||
|
||||
void GeorgesTypDialog::setupConnections()
|
||||
|
|
Loading…
Reference in a new issue