mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-22 19:39:42 +00:00
Close EditWidget when a proper row removed
This commit is contained in:
parent
33042c1464
commit
1590a04d03
1 changed files with 6 additions and 1 deletions
|
@ -811,8 +811,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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue