diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-09-16 00:21:50 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-09-16 00:21:50 +0200 |
commit | b10761711234b69cf8509bacb055f7d5c3c021e8 (patch) | |
tree | 238a0532ca7a295e8ae9420faf9b49459ee82d6b /logic | |
parent | 0a187d0ad36f1223334a260b0c51c0b1b2935298 (diff) | |
download | MultiMC-b10761711234b69cf8509bacb055f7d5c3c021e8.tar MultiMC-b10761711234b69cf8509bacb055f7d5c3c021e8.tar.gz MultiMC-b10761711234b69cf8509bacb055f7d5c3c021e8.tar.lz MultiMC-b10761711234b69cf8509bacb055f7d5c3c021e8.tar.xz MultiMC-b10761711234b69cf8509bacb055f7d5c3c021e8.zip |
GH-1121 select instance after creating it
Diffstat (limited to 'logic')
-rw-r--r-- | logic/InstanceList.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/logic/InstanceList.cpp b/logic/InstanceList.cpp index 3bdceb51..2ff0c913 100644 --- a/logic/InstanceList.cpp +++ b/logic/InstanceList.cpp @@ -388,7 +388,8 @@ QModelIndex InstanceList::getInstanceIndexById(const QString &id) const int InstanceList::getInstIndex(BaseInstance *inst) const { - for (int i = 0; i < m_instances.count(); i++) + int count = m_instances.count(); + for (int i = 0; i < count; i++) { if (inst == m_instances[i].get()) { |