1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-05 15:55:45 +00:00

HBox, VBox: call parent setPropertyOverride

This commit is contained in:
MiroslavR 2014-08-16 13:12:02 +02:00
parent 1385a86bd4
commit a9f7a30d90
2 changed files with 10 additions and 4 deletions

View File

@ -670,7 +670,7 @@ namespace MWGui
align(); align();
} }
void Box::_setPropertyImpl(const std::string& _key, const std::string& _value) bool Box::_setPropertyImpl(const std::string& _key, const std::string& _value)
{ {
if (_key == "Spacing") if (_key == "Spacing")
mSpacing = MyGUI::utility::parseValue<int>(_value); mSpacing = MyGUI::utility::parseValue<int>(_value);
@ -678,6 +678,10 @@ namespace MWGui
mPadding = MyGUI::utility::parseValue<int>(_value); mPadding = MyGUI::utility::parseValue<int>(_value);
else if (_key == "AutoResize") else if (_key == "AutoResize")
mAutoResize = MyGUI::utility::parseValue<bool>(_value); mAutoResize = MyGUI::utility::parseValue<bool>(_value);
else
return false;
return true;
} }
void HBox::align () void HBox::align ()
@ -756,7 +760,8 @@ namespace MWGui
void HBox::setPropertyOverride(const std::string& _key, const std::string& _value) void HBox::setPropertyOverride(const std::string& _key, const std::string& _value)
{ {
Box::_setPropertyImpl (_key, _value); if (!Box::_setPropertyImpl (_key, _value))
MyGUI::Widget::setPropertyOverride(_key, _value);
} }
void HBox::setSize (const MyGUI::IntSize& _value) void HBox::setSize (const MyGUI::IntSize& _value)
@ -892,7 +897,8 @@ namespace MWGui
void VBox::setPropertyOverride(const std::string& _key, const std::string& _value) void VBox::setPropertyOverride(const std::string& _key, const std::string& _value)
{ {
Box::_setPropertyImpl (_key, _value); if (!Box::_setPropertyImpl (_key, _value))
MyGUI::Widget::setPropertyOverride(_key, _value);
} }
void VBox::setSize (const MyGUI::IntSize& _value) void VBox::setSize (const MyGUI::IntSize& _value)

View File

@ -367,7 +367,7 @@ namespace MWGui
protected: protected:
virtual void align() = 0; virtual void align() = 0;
virtual void _setPropertyImpl(const std::string& _key, const std::string& _value); virtual bool _setPropertyImpl(const std::string& _key, const std::string& _value);
int mSpacing; // how much space to put between elements int mSpacing; // how much space to put between elements