1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-21 13:20:54 +00:00

Close EditWidget when a proper row removed

This commit is contained in:
Stanislav Bas 2015-08-02 22:39:41 +03:00 committed by cc9cii
parent bba3d6bec5
commit 7a927eec79

View File

@ -821,8 +821,13 @@ void CSVWorld::SimpleDialogueSubView::dataChanged (const QModelIndex & index)
void CSVWorld::SimpleDialogueSubView::rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end)
{
QModelIndex currentIndex(mTable->getModelIndex(getUniversalId().getId(), 0));
if (!currentIndex.isValid())
{
return;
}
if (currentIndex.isValid() && currentIndex.row() >= start && currentIndex.row() <= end)
if (currentIndex.parent() == parent && currentIndex.row() >= start && currentIndex.row() <= end)
{
if(mEditWidget)
{