From 4fe98ae2961618821584bd1e331be0cf75a84ea6 Mon Sep 17 00:00:00 2001 From: spx Date: Sat, 4 Aug 2012 17:29:25 -0700 Subject: [PATCH] Fixed issue with 90c81e0 --- Library/Meter.cpp | 6 ++++-- Library/MeterImage.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Library/Meter.cpp b/Library/Meter.cpp index c2cb950d..3321e9b3 100644 --- a/Library/Meter.cpp +++ b/Library/Meter.cpp @@ -292,16 +292,18 @@ void CMeter::ReadOptions(CConfigParser& parser, const WCHAR* section) } bool oldWDefined = m_WDefined; - m_W = IsFixedSize(true) ? parser.ReadInt(section, L"W", m_W) : m_W; + int w = parser.ReadInt(section, L"W", m_W); m_WDefined = parser.GetLastValueDefined(); + if (IsFixedSize(true)) m_W = w; if (!m_WDefined && oldWDefined && IsFixedSize()) { m_W = 0; } bool oldHDefined = m_HDefined; - m_H = IsFixedSize(true) ? parser.ReadInt(section, L"H", m_H) : m_H; + int h = parser.ReadInt(section, L"H", m_H); m_HDefined = parser.GetLastValueDefined(); + if (IsFixedSize(true)) m_H = h; if (!m_HDefined && oldHDefined && IsFixedSize()) { m_H = 0; diff --git a/Library/MeterImage.h b/Library/MeterImage.h index a851fc90..e9dfb666 100644 --- a/Library/MeterImage.h +++ b/Library/MeterImage.h @@ -38,7 +38,7 @@ protected: virtual void ReadOptions(CConfigParser& parser, const WCHAR* section); virtual void BindMeasures(CConfigParser& parser, const WCHAR* section); - virtual bool IsFixedSize(bool overwrite = false) { return m_ImageNameResult.empty(); } + virtual bool IsFixedSize(bool overwrite = false) { return overwrite ? true : m_ImageNameResult.empty(); } private: void LoadImage(const std::wstring& imageName, bool bLoadAlways);