forked from mirror/openmw-tes3mp
delete script subview on script deletion
This commit is contained in:
parent
d61ec1063e
commit
3a87b12baf
1 changed files with 5 additions and 2 deletions
|
@ -53,8 +53,8 @@ CSVWorld::ScriptSubView::ScriptSubView (const CSMWorld::UniversalId& id, CSMDoc:
|
|||
connect (mModel, SIGNAL (dataChanged (const QModelIndex&, const QModelIndex&)),
|
||||
this, SLOT (dataChanged (const QModelIndex&, const QModelIndex&)));
|
||||
|
||||
// connect (mModel, SIGNAL (rowsAboutToBeRemoved (const QModelIndex&, int start, int end)),
|
||||
// this, SLOT (rowsAboutToBeRemoved (const QModelIndex&, int start, int end)));
|
||||
connect (mModel, SIGNAL (rowsAboutToBeRemoved (const QModelIndex&, int, int)),
|
||||
this, SLOT (rowsAboutToBeRemoved (const QModelIndex&, int, int)));
|
||||
}
|
||||
|
||||
void CSVWorld::ScriptSubView::setEditLock (bool locked)
|
||||
|
@ -88,5 +88,8 @@ void CSVWorld::ScriptSubView::dataChanged (const QModelIndex& topLeft, const QMo
|
|||
|
||||
void CSVWorld::ScriptSubView::rowsAboutToBeRemoved (const QModelIndex& parent, int start, int end)
|
||||
{
|
||||
QModelIndex index = mModel->getModelIndex (getUniversalId().getId(), mColumn);
|
||||
|
||||
if (!parent.isValid() && index.row()>=start && index.row()<=end)
|
||||
deleteLater();
|
||||
}
|
Loading…
Reference in a new issue