summaryrefslogtreecommitdiffstats
path: root/application/groupview/VisualGroup.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-12-19 00:34:03 +0100
committerPetr Mrázek <peterix@gmail.com>2016-12-19 00:35:57 +0100
commit92bb0017878c11cc09376fae12279d401db707e3 (patch)
tree81bccda75d912c386159ae551fa500488b968721 /application/groupview/VisualGroup.cpp
parent03d2858c62764230a52a242e7adf45f73f20878e (diff)
downloadMultiMC-92bb0017878c11cc09376fae12279d401db707e3.tar
MultiMC-92bb0017878c11cc09376fae12279d401db707e3.tar.gz
MultiMC-92bb0017878c11cc09376fae12279d401db707e3.tar.lz
MultiMC-92bb0017878c11cc09376fae12279d401db707e3.tar.xz
MultiMC-92bb0017878c11cc09376fae12279d401db707e3.zip
NOISSUE fix crash caused by missing instance view layout updates
Layout wasn't updated in some cases while deleting instances.
Diffstat (limited to 'application/groupview/VisualGroup.cpp')
-rw-r--r--application/groupview/VisualGroup.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/application/groupview/VisualGroup.cpp b/application/groupview/VisualGroup.cpp
index 560fc9ca..235ca023 100644
--- a/application/groupview/VisualGroup.cpp
+++ b/application/groupview/VisualGroup.cpp
@@ -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