|
From: <cn...@us...> - 2020-11-17 20:54:20
|
Revision: 1108
http://sourceforge.net/p/seq/svn/1108
Author: cn187
Date: 2020-11-17 20:54:18 +0000 (Tue, 17 Nov 2020)
Log Message:
-----------
Don't automatically select next spawn in list when current target despawns
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/spawnlist.cpp
showeq/branches/pre_6_0_beta/src/spawnlist2.cpp
Modified: showeq/branches/pre_6_0_beta/src/spawnlist.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/spawnlist.cpp 2020-11-09 13:54:30 UTC (rev 1107)
+++ showeq/branches/pre_6_0_beta/src/spawnlist.cpp 2020-11-17 20:54:18 UTC (rev 1108)
@@ -463,6 +463,12 @@
// if there was an item, delete it and all it's children
if (j)
{
+ if (j == currentItem())
+ {
+ selectionModel()->setCurrentIndex(QModelIndex(), QItemSelectionModel::NoUpdate);
+ clearSelection();
+ }
+
delList += j->takeChildren();
// get the category that the item SpawnListItem belongs to
@@ -765,7 +771,7 @@
children.clear();
// remove the item from the category list
- delete m_categoryListItems.take((void*)cat);
+ delete m_categoryListItems.take(litem);
}
}
Modified: showeq/branches/pre_6_0_beta/src/spawnlist2.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/spawnlist2.cpp 2020-11-09 13:54:30 UTC (rev 1107)
+++ showeq/branches/pre_6_0_beta/src/spawnlist2.cpp 2020-11-17 20:54:18 UTC (rev 1108)
@@ -289,16 +289,20 @@
// find the list item
SpawnListItem* litem = find(item);
+ if (item == m_selectedItem)
+ {
+ m_selectedItem = NULL;
+ m_spawnList->clearSelection();
+ }
+
// delete the list item
if (litem != NULL)
{
- delete m_spawnListItemDict.take((void*)item);
+ delete m_spawnListItemDict.take(litem);
updateCount();
}
- if (item == m_selectedItem)
- m_selectedItem = NULL;
}
void SpawnListWindow2::changeItem(const Item* item, uint32_t changeItem)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|