Refactoring in ColourPicker::get_value()
This commit is contained in:
parent
ece2c34e58
commit
35f15739d1
@ -1387,10 +1387,7 @@ void ColourPicker::set_value(const boost::any& value, bool change_event)
|
|||||||
boost::any& ColourPicker::get_value()
|
boost::any& ColourPicker::get_value()
|
||||||
{
|
{
|
||||||
auto colour = static_cast<wxColourPickerCtrl*>(window)->GetColour();
|
auto colour = static_cast<wxColourPickerCtrl*>(window)->GetColour();
|
||||||
if (colour == wxTransparentColour)
|
m_value = (colour == wxTransparentColour) ? std::string("") : encode_color(ColorRGB(colour.Red(), colour.Green(), colour.Blue()));
|
||||||
m_value = std::string("");
|
|
||||||
else
|
|
||||||
m_value = encode_color(ColorRGB(colour.Red(), colour.Green(), colour.Blue()));
|
|
||||||
return m_value;
|
return m_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user