mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-27 01:26:30 +00:00
Shouldn't crash when adding a new row.
--HG-- branch : gsoc2014-dfighter
This commit is contained in:
parent
26b120f664
commit
ed44cc4823
1 changed files with 12 additions and 0 deletions
|
@ -256,10 +256,22 @@ void UXTEditor::activateWindow()
|
||||||
|
|
||||||
void UXTEditor::insertRow()
|
void UXTEditor::insertRow()
|
||||||
{
|
{
|
||||||
|
blockTableSignals( true );
|
||||||
|
|
||||||
d_ptr->infos.push_back( STRING_MANAGER::TStringInfo() );
|
d_ptr->infos.push_back( STRING_MANAGER::TStringInfo() );
|
||||||
d_ptr->t->setRowCount( d_ptr->t->rowCount() + 1 );
|
d_ptr->t->setRowCount( d_ptr->t->rowCount() + 1 );
|
||||||
|
int row = d_ptr->t->rowCount() - 1;
|
||||||
|
|
||||||
|
QTableWidgetItem *item1 = new QTableWidgetItem();
|
||||||
|
QTableWidgetItem *item2 = new QTableWidgetItem();
|
||||||
|
d_ptr->t->setItem( row, 0, item1 );
|
||||||
|
d_ptr->t->setItem( row, 1, item2 );
|
||||||
|
|
||||||
|
markRowUntranslated( row );
|
||||||
|
|
||||||
setWindowModified( true );
|
setWindowModified( true );
|
||||||
|
|
||||||
|
blockTableSignals( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue