Use dedicated function to retrieve Boolean value from wxVariant
GetBool() is dedicated for this purpose.
This commit is contained in:
parent
fcc961b379
commit
c5cdb66c82
@ -142,7 +142,7 @@ bool wxStringProperty::DoSetAttribute( const wxString& name, wxVariant& value )
|
|||||||
{
|
{
|
||||||
if ( name == wxPG_STRING_PASSWORD )
|
if ( name == wxPG_STRING_PASSWORD )
|
||||||
{
|
{
|
||||||
if ( value.GetLong() )
|
if ( value.GetBool() )
|
||||||
m_flags |= wxPG_PROP_PASSWORD;
|
m_flags |= wxPG_PROP_PASSWORD;
|
||||||
else
|
else
|
||||||
m_flags &= ~(wxPG_PROP_PASSWORD);
|
m_flags &= ~(wxPG_PROP_PASSWORD);
|
||||||
@ -1181,7 +1181,7 @@ bool wxBoolProperty::DoSetAttribute( const wxString& name, wxVariant& value )
|
|||||||
#if wxPG_INCLUDE_CHECKBOX
|
#if wxPG_INCLUDE_CHECKBOX
|
||||||
if ( name == wxPG_BOOL_USE_CHECKBOX )
|
if ( name == wxPG_BOOL_USE_CHECKBOX )
|
||||||
{
|
{
|
||||||
if ( value.GetLong() )
|
if ( value.GetBool() )
|
||||||
m_flags |= wxPG_PROP_USE_CHECKBOX;
|
m_flags |= wxPG_PROP_USE_CHECKBOX;
|
||||||
else
|
else
|
||||||
m_flags &= ~(wxPG_PROP_USE_CHECKBOX);
|
m_flags &= ~(wxPG_PROP_USE_CHECKBOX);
|
||||||
@ -1190,7 +1190,7 @@ bool wxBoolProperty::DoSetAttribute( const wxString& name, wxVariant& value )
|
|||||||
#endif
|
#endif
|
||||||
if ( name == wxPG_BOOL_USE_DOUBLE_CLICK_CYCLING )
|
if ( name == wxPG_BOOL_USE_DOUBLE_CLICK_CYCLING )
|
||||||
{
|
{
|
||||||
if ( value.GetLong() )
|
if ( value.GetBool() )
|
||||||
m_flags |= wxPG_PROP_USE_DCC;
|
m_flags |= wxPG_PROP_USE_DCC;
|
||||||
else
|
else
|
||||||
m_flags &= ~(wxPG_PROP_USE_DCC);
|
m_flags &= ~(wxPG_PROP_USE_DCC);
|
||||||
@ -2156,7 +2156,7 @@ bool wxFileProperty::DoSetAttribute( const wxString& name, wxVariant& value )
|
|||||||
// stored in m_attributes.
|
// stored in m_attributes.
|
||||||
if ( name == wxPG_FILE_SHOW_FULL_PATH )
|
if ( name == wxPG_FILE_SHOW_FULL_PATH )
|
||||||
{
|
{
|
||||||
if ( value.GetLong() )
|
if ( value.GetBool() )
|
||||||
m_flags |= wxPG_PROP_SHOW_FULL_FILENAME;
|
m_flags |= wxPG_PROP_SHOW_FULL_FILENAME;
|
||||||
else
|
else
|
||||||
m_flags &= ~(wxPG_PROP_SHOW_FULL_FILENAME);
|
m_flags &= ~(wxPG_PROP_SHOW_FULL_FILENAME);
|
||||||
|
Loading…
Reference in New Issue
Block a user