value,
m_precision,
!(argFlags & wxPG_FULL_VALUE),
- (wxString*) NULL);
+ NULL);
}
return text;
}
}
int wxEnumProperty::ms_nextIndex = -2;
-int wxEnumProperty::ms_prevIndex = -1;
void wxEnumProperty::OnSetValue()
{
setAsNextIndex = -1;
value = text;
}
- else if ( m_index != useIndex )
+ else if ( useIndex != GetIndex() )
{
if ( useIndex != -1 )
{
}
else
{
- if ( m_index != intVal )
+ if ( intVal != GetIndex() )
{
ms_nextIndex = intVal;
}
wxEnumProperty::OnValidationFailure( wxVariant& WXUNUSED(pendingValue) )
{
// Revert index
- m_index = ms_prevIndex;
ResetNextIndex();
}
void wxEnumProperty::SetIndex( int index )
{
- ms_prevIndex = m_index;
ms_nextIndex = -2;
m_index = index;
}
int wxEnumProperty::GetIndex() const
{
+ if ( m_value.IsNull() )
+ return -1;
+
if ( ms_nextIndex != -2 )
return ms_nextIndex;
+
return m_index;
}
void wxFlagsProperty::Init()
{
- SetParentalType(wxPG_PROP_AGGREGATE);
-
long value = m_value;
//
{
boolProp = new wxBoolProperty( label, label, child_val );
}
- AddChild(boolProp);
+ AddPrivateChild(boolProp);
}
m_oldChoicesData = m_choices.GetDataPtr();
wxFlagsProperty::wxFlagsProperty( const wxString& label, const wxString& name,
const wxChar** labels, const long* values, long value ) : wxPGProperty(label,name)
{
- m_oldChoicesData = (wxPGChoicesData*) NULL;
+ m_oldChoicesData = NULL;
if ( labels )
{
const wxArrayString& labels, const wxArrayInt& values, int value )
: wxPGProperty(label,name)
{
- m_oldChoicesData = (wxPGChoicesData*) NULL;
+ m_oldChoicesData = NULL;
if ( &labels && labels.size() )
{
wxPGChoices& choices, long value )
: wxPGProperty(label,name)
{
- m_oldChoicesData = (wxPGChoicesData*) NULL;
+ m_oldChoicesData = NULL;
if ( choices.IsOk() )
{
// Manipulator buttons
wxBoxSizer* colsizer = new wxBoxSizer( wxVERTICAL );
- m_butCustom = (wxButton*) NULL;
+ m_butCustom = NULL;
if ( m_custBtText )
{
m_butCustom = new wxButton(this,28,::wxGetTranslation(m_custBtText));
void wxPGArrayStringEditorDialog::Init()
{
- m_pCallingClass = (wxArrayStringProperty*) NULL;
+ m_pCallingClass = NULL;
}
void wxPGArrayStringEditorDialog::OnCustomEditClick(wxCommandEvent& )