summaryrefslogtreecommitdiffstats
path: root/pokemodr/CoinListObjectUI.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-05-21 17:22:27 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-05-21 17:22:27 +0000
commitfa85318e91ea9bbe4638092767b3b8e0ea64f57c (patch)
treeeb0bcb69ab624721d59ec9905d392937810cb7b6 /pokemodr/CoinListObjectUI.cpp
parent404b30c8601d3a3cb25bb6972427d93b1ebed640 (diff)
downloadsigen-fa85318e91ea9bbe4638092767b3b8e0ea64f57c.tar.gz
sigen-fa85318e91ea9bbe4638092767b3b8e0ea64f57c.tar.xz
sigen-fa85318e91ea9bbe4638092767b3b8e0ea64f57c.zip
[FIX] Classes in pokemod will no longer emit a changed signal if not actually changed
[FIX] Logic error with checking to see if certain GUI elements need resetting [FIX] Using activated rather than currentIndexChanged signals for combo boxes [FIX] Qt bugs now irrelevant git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@161 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemodr/CoinListObjectUI.cpp')
-rw-r--r--pokemodr/CoinListObjectUI.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/pokemodr/CoinListObjectUI.cpp b/pokemodr/CoinListObjectUI.cpp
index 1339ffe6..6c0a37ee 100644
--- a/pokemodr/CoinListObjectUI.cpp
+++ b/pokemodr/CoinListObjectUI.cpp
@@ -39,7 +39,7 @@ CoinListObjectUI::~CoinListObjectUI()
void CoinListObjectUI::initGui()
{
- connect(varType, SIGNAL(currentIndexChanged()), this, SLOT(setGui()));
+ connect(varType, SIGNAL(activated(const int)), this, SLOT(setGui()));
varType->addItems(CoinListObject::TypeStr);
}
@@ -58,6 +58,7 @@ void CoinListObjectUI::setGui()
const Item* item = static_cast<const Pokemod*>(original()->pokemod())->item(i);
varObject->addItem(item->name(), item->id());
}
+ varAmount->setMaximum(INT_MAX);
}
else
{
@@ -66,6 +67,7 @@ void CoinListObjectUI::setGui()
const Species* species = static_cast<const Pokemod*>(original()->pokemod())->species(i);
varObject->addItem(species->name(), species->id());
}
+ varAmount->setMaximum(1);
}
}
varObject->setCurrentIndex(varObject->findData(static_cast<CoinListObject*>(modified())->object()));
@@ -86,12 +88,12 @@ void CoinListObjectUI::discard()
emit(changed(false));
}
-void CoinListObjectUI::on_varType_currentIndexChanged(const int type)
+void CoinListObjectUI::on_varType_activated(const int type)
{
static_cast<CoinListObject*>(modified())->setType(type);
}
-void CoinListObjectUI::on_varObject_currentIndexChanged(const int obey)
+void CoinListObjectUI::on_varObject_activated(const int obey)
{
static_cast<CoinListObject*>(modified())->setObject(varObject->itemData(obey).toInt());
}