Added proper COW to wxPGChoices, moved wxPGChoices code from propgrid.cpp to property.cpp (to match header organization), removed some now-unneeded helper functions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -873,11 +873,7 @@ public:
|
||||
void AssignData( wxPGChoicesData* data );
|
||||
|
||||
/** Delete all choices. */
|
||||
void Clear()
|
||||
{
|
||||
if ( m_data != wxPGChoicesEmptyData )
|
||||
m_data->Clear();
|
||||
}
|
||||
void Clear();
|
||||
|
||||
/**
|
||||
Returns a real copy of the choices.
|
||||
@@ -980,16 +976,7 @@ public:
|
||||
}
|
||||
|
||||
// Creates exclusive copy of current choices
|
||||
void SetExclusive()
|
||||
{
|
||||
if ( m_data->m_refCount != 1 )
|
||||
{
|
||||
wxPGChoicesData* data = new wxPGChoicesData();
|
||||
data->CopyDataFrom(m_data);
|
||||
Free();
|
||||
m_data = data;
|
||||
}
|
||||
}
|
||||
void AllocExclusive();
|
||||
|
||||
// Returns data, increases refcount.
|
||||
wxPGChoicesData* GetData()
|
||||
@@ -1922,14 +1909,6 @@ public:
|
||||
*/
|
||||
void SetValueImage( wxBitmap& bmp );
|
||||
|
||||
/** If property has choices and they are not yet exclusive, new such copy
|
||||
of them will be created.
|
||||
*/
|
||||
void SetChoicesExclusive()
|
||||
{
|
||||
m_choices.SetExclusive();
|
||||
}
|
||||
|
||||
/** Sets selected choice and changes property value.
|
||||
|
||||
Tries to retain value type, although currently if it is not string,
|
||||
|
Reference in New Issue
Block a user