1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-23 15:10:03 +00:00

Close EditWidget when a proper row removed

This commit is contained in:
Stanislav Bas 2015-08-02 22:39:41 +03:00
parent 33042c1464
commit 1590a04d03

View file

@ -812,7 +812,12 @@ void CSVWorld::SimpleDialogueSubView::rowsAboutToBeRemoved(const QModelIndex &pa
{ {
QModelIndex currentIndex(mTable->getModelIndex(getUniversalId().getId(), 0)); QModelIndex currentIndex(mTable->getModelIndex(getUniversalId().getId(), 0));
if (currentIndex.isValid() && currentIndex.row() >= start && currentIndex.row() <= end) if (!currentIndex.isValid())
{
return;
}
if (currentIndex.parent() == parent && currentIndex.row() >= start && currentIndex.row() <= end)
{ {
if(mEditWidget) if(mEditWidget)
{ {