|
From: <cn...@us...> - 2020-10-29 13:30:21
|
Revision: 1088
http://sourceforge.net/p/seq/svn/1088
Author: cn187
Date: 2020-10-29 13:30:18 +0000 (Thu, 29 Oct 2020)
Log Message:
-----------
Fix spawnlist2 category selection
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/spawnlist2.cpp
Modified: showeq/branches/pre_6_0_beta/src/spawnlist2.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/spawnlist2.cpp 2020-10-28 14:23:07 UTC (rev 1087)
+++ showeq/branches/pre_6_0_beta/src/spawnlist2.cpp 2020-10-29 13:30:18 UTC (rev 1088)
@@ -729,17 +729,14 @@
void SpawnListWindow2::categorySelected(int index)
{
- CategoryListIterator it(m_categoryMgr->getCategories());
+ const CategoryList categories = m_categoryMgr->getCategories();
Category* cat = nullptr;
- int i = 0;
- while (it.hasNext() && (i < index))
- {
- cat = it.next();
- if (!cat)
- break;
- ++i;
- }
+ if (index >= categories.count()) return;
+
+ cat = categories.at(index);
+ if (!cat) return;
+
// set the current category
m_currentCategory = cat;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|