|
From: <cn...@us...> - 2024-08-21 19:57:57
|
Revision: 1520
http://sourceforge.net/p/seq/svn/1520
Author: cn187
Date: 2024-08-21 19:57:54 +0000 (Wed, 21 Aug 2024)
Log Message:
-----------
Don't auto-select another mob when a targeted corpse decays
Modified Paths:
--------------
showeq/trunk/src/interface.cpp
showeq/trunk/src/spawnlist.cpp
showeq/trunk/src/spawnlist2.cpp
Modified: showeq/trunk/src/interface.cpp
===================================================================
--- showeq/trunk/src/interface.cpp 2024-08-21 19:57:47 UTC (rev 1519)
+++ showeq/trunk/src/interface.cpp 2024-08-21 19:57:54 UTC (rev 1520)
@@ -5988,7 +5988,7 @@
{
m_spawnList2 = new SpawnListWindow2(m_player, m_spawnShell,
m_categoryMgr,
- 0, "spawnlist");
+ 0, "spawnlist2");
setDockEnabled(m_spawnList2,
pSEQPrefs->getPrefBool("DockableSpawnList2",
"Interface", true));
Modified: showeq/trunk/src/spawnlist.cpp
===================================================================
--- showeq/trunk/src/spawnlist.cpp 2024-08-21 19:57:47 UTC (rev 1519)
+++ showeq/trunk/src/spawnlist.cpp 2024-08-21 19:57:54 UTC (rev 1520)
@@ -474,7 +474,7 @@
{
if (j == currentItem())
{
- selectionModel()->setCurrentIndex(QModelIndex(), QItemSelectionModel::NoUpdate);
+ selectionModel()->setCurrentIndex(QModelIndex(), QItemSelectionModel::Clear);
clearSelection();
}
delList += j->takeChildren();
@@ -1070,7 +1070,11 @@
// the list is limited to one selection at a time, so we can take the first
SEQListViewItem* litem = selected.first();
- if (litem == NULL) return;
+ if (litem == NULL)
+ {
+ clearSelection();
+ return;
+ }
const Item* item = ((SpawnListItem*)litem)->item();
Modified: showeq/trunk/src/spawnlist2.cpp
===================================================================
--- showeq/trunk/src/spawnlist2.cpp 2024-08-21 19:57:47 UTC (rev 1519)
+++ showeq/trunk/src/spawnlist2.cpp 2024-08-21 19:57:54 UTC (rev 1520)
@@ -76,7 +76,7 @@
// create the spawn list combo box
m_categoryCombo = new QComboBox(this);
- m_categoryCombo->setObjectName("spawnlistcombo");
+ m_categoryCombo->setObjectName("spawnlist2combo");
m_categoryCombo->setEditable(false);
m_categoryCombo->setDuplicatesEnabled(false);
hLayout->addWidget(m_categoryCombo, 0, Qt::AlignLeft);
@@ -108,7 +108,7 @@
// create the spawn listview
m_spawnList = new SEQListView(preferenceName(),
- this, "spawnlistview");
+ this, "spawnlist2view");
vLayout->addWidget(m_spawnList);
m_spawnList->addColumn ("Name");
@@ -245,7 +245,7 @@
}
m_menu = new SpawnListMenu(m_spawnList, this, m_spawnShell->filterMgr(),
- m_categoryMgr, this, "spawnlist menu");
+ m_categoryMgr, this, "spawnlist2 menu");
m_menu->addSeparator();
QAction* tmpAction;
@@ -292,8 +292,9 @@
if (item == m_selectedItem)
{
m_selectedItem = NULL;
- m_spawnList->selectionModel()->setCurrentIndex(QModelIndex(), QItemSelectionModel::NoUpdate);
+ m_spawnList->selectionModel()->setCurrentIndex(QModelIndex(), QItemSelectionModel::Clear);
m_spawnList->clearSelection();
+ m_spawnList->setCurrentItem(NULL);
}
// delete the list item
@@ -418,7 +419,9 @@
if (!item)
{
m_selectedItem = NULL;
+ m_spawnList->selectionModel()->setCurrentIndex(QModelIndex(), QItemSelectionModel::Clear);
m_spawnList->clearSelection();
+ m_spawnList->setCurrentItem(NULL);
return;
}
@@ -798,7 +801,14 @@
// the list is limited to one selection at a time, so we can take the first
SEQListViewItem* litem = selected.first();
- if (litem == NULL) return;
+ if (litem == NULL)
+ {
+ m_selectedItem = NULL;
+ m_spawnList->selectionModel()->setCurrentIndex(QModelIndex(), QItemSelectionModel::Clear);
+ m_spawnList->clearSelection();
+ m_spawnList->setCurrentItem(NULL);
+ return;
+ }
m_selectedItem = ((SpawnListItem*)litem)->item();
@@ -909,7 +919,9 @@
if (!item)
{
m_selectedItem = NULL;
+ m_spawnList->selectionModel()->setCurrentIndex(QModelIndex(), QItemSelectionModel::Clear);
m_spawnList->clearSelection();
+ m_spawnList->setCurrentItem(NULL);
return;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|