Ask for confirmation before deleting a row.
--HG-- branch : gsoc2014-dfighter
This commit is contained in:
parent
62a6b408a2
commit
fbcfa4ee6f
1 changed files with 8 additions and 0 deletions
|
@ -165,6 +165,14 @@ void UXTEditor::deleteRow()
|
||||||
if( r < 0 )
|
if( r < 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
int answer = QMessageBox::question( this,
|
||||||
|
tr( "Deleting a row" ),
|
||||||
|
tr( "Are you sure you want to delete this row?" ),
|
||||||
|
QMessageBox::Yes,
|
||||||
|
QMessageBox::Cancel );
|
||||||
|
if( QMessageBox::Yes != answer )
|
||||||
|
return;
|
||||||
|
|
||||||
std::vector< STRING_MANAGER::TStringInfo >::iterator itr = d_ptr->infos.begin();
|
std::vector< STRING_MANAGER::TStringInfo >::iterator itr = d_ptr->infos.begin();
|
||||||
itr += r;
|
itr += r;
|
||||||
d_ptr->infos.erase( itr );
|
d_ptr->infos.erase( itr );
|
||||||
|
|
Loading…
Reference in a new issue