summaryrefslogtreecommitdiff
path: root/src/gui/widgets/setuptabscroll.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-07-03 17:23:05 +0300
committerAndrei Karas <akaras@inbox.ru>2011-07-03 17:23:05 +0300
commitd5eb424dcd214b4646a960e04b9271e70b096856 (patch)
treef36891e6406861ab0d4a82d233545e3f33a46ab4 /src/gui/widgets/setuptabscroll.cpp
parent634149ac7d248d2e078ee9707379a5056d31077e (diff)
downloadmanaplus-d5eb424dcd214b4646a960e04b9271e70b096856.tar.gz
manaplus-d5eb424dcd214b4646a960e04b9271e70b096856.tar.bz2
manaplus-d5eb424dcd214b4646a960e04b9271e70b096856.tar.xz
manaplus-d5eb424dcd214b4646a960e04b9271e70b096856.zip
Add separator field to setup settings tabs.
Diffstat (limited to 'src/gui/widgets/setuptabscroll.cpp')
-rw-r--r--src/gui/widgets/setuptabscroll.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/gui/widgets/setuptabscroll.cpp b/src/gui/widgets/setuptabscroll.cpp
index c3fd4dee8..805c0c8c7 100644
--- a/src/gui/widgets/setuptabscroll.cpp
+++ b/src/gui/widgets/setuptabscroll.cpp
@@ -61,14 +61,18 @@ SetupTabScroll::~SetupTabScroll()
void SetupTabScroll::addControl(SetupItem *widget)
{
- std::map<std::string, SetupItem*>::iterator iter
- = mItems.find(widget->getActionEventId());
- if (iter != mItems.end())
+ const std::string actionId = widget->getActionEventId();
+ if (!actionId.empty())
{
- delete (*iter).second;
- mItems.erase(iter);
+ std::map<std::string, SetupItem*>::iterator iter
+ = mItems.find(actionId);
+ if (iter != mItems.end())
+ {
+ delete (*iter).second;
+ mItems.erase(iter);
+ }
+ mItems[widget->getActionEventId()] = widget;
}
- mItems[widget->getActionEventId()] = widget;
mAllItems.insert(widget);
}