Fixed issue with 90c81e0

This commit is contained in:
spx 2012-08-04 17:29:25 -07:00
parent 90c81e01d1
commit 4fe98ae296
2 changed files with 5 additions and 3 deletions

View File

@ -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;

View File

@ -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);