summaryrefslogtreecommitdiff
path: root/src/gui/widgets/statspage.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-26 22:58:31 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-26 22:58:31 +0300
commit182fe0545897aae420dddf92efc17784be622ebf (patch)
treed306d6706f928956211daed905f6547ec7bdb743 /src/gui/widgets/statspage.cpp
parent83981f76348655507d225aca220893e668b09bdc (diff)
downloadplus-182fe0545897aae420dddf92efc17784be622ebf.tar.gz
plus-182fe0545897aae420dddf92efc17784be622ebf.tar.bz2
plus-182fe0545897aae420dddf92efc17784be622ebf.tar.xz
plus-182fe0545897aae420dddf92efc17784be622ebf.zip
Try update attributes/stats in stat pages in any changes.
Diffstat (limited to 'src/gui/widgets/statspage.cpp')
-rw-r--r--src/gui/widgets/statspage.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/widgets/statspage.cpp b/src/gui/widgets/statspage.cpp
index 1f30f2862..9b45ce227 100644
--- a/src/gui/widgets/statspage.cpp
+++ b/src/gui/widgets/statspage.cpp
@@ -41,6 +41,7 @@ StatsPage::StatsPage(const Widget2 *const widget,
const std::string &page) :
Container(widget),
WidgetListener(),
+ AttributeListener(),
StatListener(),
mAttrs(),
mAttrCont(new VertContainer(this, 32)),
@@ -68,6 +69,15 @@ void StatsPage::widgetResized(const Event &event A_UNUSED)
mAttrScroll->setSize(getWidth(), getHeight());
}
+void StatsPage::attributeChanged(const AttributesT id,
+ const int oldVal A_UNUSED,
+ const int newVal A_UNUSED)
+{
+ const Attrs::const_iterator it = mAttrs.find(id);
+ if (it != mAttrs.end() && it->second)
+ it->second->update();
+}
+
void StatsPage::statChanged(const AttributesT id,
const int oldVal1 A_UNUSED,
const int oldVal2 A_UNUSED)