Declare WXVARIANT template specialization to assign wxColourPropertyValue to wxVariant
This commit is contained in:
@@ -860,6 +860,12 @@ static const long gs_cp_es_syscolour_values[] = {
|
|||||||
|
|
||||||
IMPLEMENT_VARIANT_OBJECT_EXPORTED_SHALLOWCMP(wxColourPropertyValue, WXDLLIMPEXP_PROPGRID)
|
IMPLEMENT_VARIANT_OBJECT_EXPORTED_SHALLOWCMP(wxColourPropertyValue, WXDLLIMPEXP_PROPGRID)
|
||||||
|
|
||||||
|
template<> inline wxVariant WXVARIANT(const wxColourPropertyValue& value)
|
||||||
|
{
|
||||||
|
wxVariant variant;
|
||||||
|
variant << value;
|
||||||
|
return variant;
|
||||||
|
}
|
||||||
|
|
||||||
// Class body is in advprops.h
|
// Class body is in advprops.h
|
||||||
|
|
||||||
@@ -874,7 +880,7 @@ void wxSystemColourProperty::Init( int type, const wxColour& colour )
|
|||||||
|
|
||||||
m_flags |= wxPG_PROP_STATIC_CHOICES; // Colour selection cannot be changed.
|
m_flags |= wxPG_PROP_STATIC_CHOICES; // Colour selection cannot be changed.
|
||||||
|
|
||||||
m_value << cpv;
|
m_value = WXVARIANT(cpv);
|
||||||
|
|
||||||
OnSetValue();
|
OnSetValue();
|
||||||
}
|
}
|
||||||
@@ -988,8 +994,7 @@ wxColourPropertyValue wxSystemColourProperty::GetVal( const wxVariant* pVariant
|
|||||||
|
|
||||||
wxVariant wxSystemColourProperty::DoTranslateVal( wxColourPropertyValue& v ) const
|
wxVariant wxSystemColourProperty::DoTranslateVal( wxColourPropertyValue& v ) const
|
||||||
{
|
{
|
||||||
wxVariant variant;
|
wxVariant variant = WXVARIANT(v);
|
||||||
variant << v;
|
|
||||||
return variant;
|
return variant;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user