NOISSUE fix crash caused by missing instance view layout updates

Layout wasn't updated in some cases while deleting instances.
This commit is contained in:
Petr Mrázek
2016-12-19 00:34:03 +01:00
parent 03d2858c62
commit 92bb001787
3 changed files with 22 additions and 22 deletions

View File

@ -4,6 +4,7 @@
#include <QPainter>
#include <QtMath>
#include <QApplication>
#include <QDebug>
#include "GroupView.h"
@ -53,7 +54,6 @@ void VisualGroup::update()
QPair<int, int> VisualGroup::positionOf(const QModelIndex &index) const
{
int x = 0;
int y = 0;
for (auto & row: rows)
{
@ -66,7 +66,8 @@ QPair<int, int> VisualGroup::positionOf(const QModelIndex &index) const
}
y++;
}
return qMakePair(x, y);
qWarning() << "Item" << index.row() << index.data(Qt::DisplayRole).toString() << "not found in visual group" << text;
return qMakePair(0, 0);
}
int VisualGroup::rowTopOf(const QModelIndex &index) const