Image and button meters don't ignore errors anymore if they are bound to a non-existing measure.

This commit is contained in:
Kimmo Pekkola 2009-07-24 08:19:01 +00:00
parent a588a86b3b
commit ace2a67049
2 changed files with 5 additions and 11 deletions

View File

@ -242,19 +242,16 @@ bool CMeterButton::Draw()
/* /*
** BindMeasure ** BindMeasure
** **
** Overridden method. The Image meters need not to be bound on anything ** Overridden method. The meters need not to be bound on anything
** **
*/ */
void CMeterButton::BindMeasure(std::list<CMeasure*>& measures) void CMeterButton::BindMeasure(std::list<CMeasure*>& measures)
{ {
try // It's ok not to bind meter to anything
if (!m_MeasureName.empty())
{ {
CMeter::BindMeasure(measures); CMeter::BindMeasure(measures);
} }
catch(CError)
{
// Do nothing (ignore errors)
}
} }
bool CMeterButton::MouseUp(POINT pos, CMeterWindow* window) bool CMeterButton::MouseUp(POINT pos, CMeterWindow* window)

View File

@ -257,13 +257,10 @@ bool CMeterImage::Draw()
*/ */
void CMeterImage::BindMeasure(std::list<CMeasure*>& measures) void CMeterImage::BindMeasure(std::list<CMeasure*>& measures)
{ {
try // It's ok not to bind image meter to anything
if (!m_MeasureName.empty())
{ {
CMeter::BindMeasure(measures); CMeter::BindMeasure(measures);
} }
catch(CError)
{
// Do nothing (ignore errors)
}
} }