Merge two wxDataViewWidgetImpl::Remove() overloads into one
Having 2 different overloads might have been useful for Carbon implementation, but as they do exactly the same thing in the Cocoa version, leave only one of them -- and don't pass it the item, or items, being deleted as they're not used anyhow. No real changes.
This commit is contained in:
@@ -486,10 +486,7 @@ public:
|
|||||||
virtual wxDataViewItem GetTopItem() const;
|
virtual wxDataViewItem GetTopItem() const;
|
||||||
virtual bool IsExpanded(const wxDataViewItem& item) const;
|
virtual bool IsExpanded(const wxDataViewItem& item) const;
|
||||||
virtual bool Reload();
|
virtual bool Reload();
|
||||||
virtual bool Remove(const wxDataViewItem& parent,
|
virtual bool Remove(const wxDataViewItem& parent);
|
||||||
const wxDataViewItem& item);
|
|
||||||
virtual bool Remove(const wxDataViewItem& parent,
|
|
||||||
const wxDataViewItemArray& item);
|
|
||||||
virtual bool Update(const wxDataViewColumn* columnPtr);
|
virtual bool Update(const wxDataViewColumn* columnPtr);
|
||||||
virtual bool Update(const wxDataViewItem& parent,
|
virtual bool Update(const wxDataViewItem& parent,
|
||||||
const wxDataViewItem& item);
|
const wxDataViewItem& item);
|
||||||
|
@@ -68,8 +68,7 @@ public:
|
|||||||
virtual wxDataViewItem GetTopItem (void) const = 0; // get top-most visible item
|
virtual wxDataViewItem GetTopItem (void) const = 0; // get top-most visible item
|
||||||
virtual bool IsExpanded (wxDataViewItem const& item) const = 0; // checks if the passed item is expanded in the native control
|
virtual bool IsExpanded (wxDataViewItem const& item) const = 0; // checks if the passed item is expanded in the native control
|
||||||
virtual bool Reload (void) = 0; // clears the native control and reloads all data
|
virtual bool Reload (void) = 0; // clears the native control and reloads all data
|
||||||
virtual bool Remove (wxDataViewItem const& parent, wxDataViewItem const& item) = 0; // removes an item from the native control
|
virtual bool Remove (wxDataViewItem const& parent) = 0; // removes one or more items under the given parent from the native control
|
||||||
virtual bool Remove (wxDataViewItem const& parent, wxDataViewItemArray const& item) = 0; // removes items from the native control
|
|
||||||
virtual bool Update (wxDataViewColumn const* columnPtr) = 0; // updates the items in the passed column of the native control
|
virtual bool Update (wxDataViewColumn const* columnPtr) = 0; // updates the items in the passed column of the native control
|
||||||
virtual bool Update (wxDataViewItem const& parent, wxDataViewItem const& item) = 0; // updates the passed item in the native control
|
virtual bool Update (wxDataViewItem const& parent, wxDataViewItem const& item) = 0; // updates the passed item in the native control
|
||||||
virtual bool Update (wxDataViewItem const& parent, wxDataViewItemArray const& items) = 0; // updates the passed items in the native control
|
virtual bool Update (wxDataViewItem const& parent, wxDataViewItemArray const& items) = 0; // updates the passed items in the native control
|
||||||
|
@@ -2339,16 +2339,7 @@ bool wxCocoaDataViewControl::Reload()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxCocoaDataViewControl::Remove(const wxDataViewItem& parent, const wxDataViewItem& WXUNUSED(item))
|
bool wxCocoaDataViewControl::Remove(const wxDataViewItem& parent)
|
||||||
{
|
|
||||||
if (parent.IsOk())
|
|
||||||
[m_OutlineView reloadItem:[m_DataSource getDataViewItemFromBuffer:parent] reloadChildren:YES];
|
|
||||||
else
|
|
||||||
[m_OutlineView reloadData];
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxCocoaDataViewControl::Remove(const wxDataViewItem& parent, const wxDataViewItemArray& WXUNUSED(item))
|
|
||||||
{
|
{
|
||||||
if (parent.IsOk())
|
if (parent.IsOk())
|
||||||
[m_OutlineView reloadItem:[m_DataSource getDataViewItemFromBuffer:parent] reloadChildren:YES];
|
[m_OutlineView reloadItem:[m_DataSource getDataViewItemFromBuffer:parent] reloadChildren:YES];
|
||||||
|
@@ -170,7 +170,7 @@ bool wxOSXDataViewModelNotifier::ItemDeleted(wxDataViewItem const& parent, wxDat
|
|||||||
// to prevent the control trying to ask the model to update an already deleted item the control is informed that currently a deleting process
|
// to prevent the control trying to ask the model to update an already deleted item the control is informed that currently a deleting process
|
||||||
// has been started and that variables can currently not be updated even when requested by the system:
|
// has been started and that variables can currently not be updated even when requested by the system:
|
||||||
m_DataViewCtrlPtr->SetDeleting(true);
|
m_DataViewCtrlPtr->SetDeleting(true);
|
||||||
noFailureFlag = m_DataViewCtrlPtr->GetDataViewPeer()->Remove(parent,item);
|
noFailureFlag = m_DataViewCtrlPtr->GetDataViewPeer()->Remove(parent);
|
||||||
// enable automatic updating again:
|
// enable automatic updating again:
|
||||||
m_DataViewCtrlPtr->SetDeleting(false);
|
m_DataViewCtrlPtr->SetDeleting(false);
|
||||||
|
|
||||||
@@ -179,7 +179,7 @@ bool wxOSXDataViewModelNotifier::ItemDeleted(wxDataViewItem const& parent, wxDat
|
|||||||
return noFailureFlag;
|
return noFailureFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxOSXDataViewModelNotifier::ItemsDeleted(wxDataViewItem const& parent, wxDataViewItemArray const& items)
|
bool wxOSXDataViewModelNotifier::ItemsDeleted(wxDataViewItem const& parent, wxDataViewItemArray const& WXUNUSED(items))
|
||||||
{
|
{
|
||||||
bool noFailureFlag;
|
bool noFailureFlag;
|
||||||
|
|
||||||
@@ -190,7 +190,7 @@ bool wxOSXDataViewModelNotifier::ItemsDeleted(wxDataViewItem const& parent, wxDa
|
|||||||
// has been started and that variables can currently not be updated even when requested by the system:
|
// has been started and that variables can currently not be updated even when requested by the system:
|
||||||
m_DataViewCtrlPtr->SetDeleting(true);
|
m_DataViewCtrlPtr->SetDeleting(true);
|
||||||
// delete all specified items:
|
// delete all specified items:
|
||||||
noFailureFlag = m_DataViewCtrlPtr->GetDataViewPeer()->Remove(parent,items);
|
noFailureFlag = m_DataViewCtrlPtr->GetDataViewPeer()->Remove(parent);
|
||||||
// enable automatic updating again:
|
// enable automatic updating again:
|
||||||
m_DataViewCtrlPtr->SetDeleting(false);
|
m_DataViewCtrlPtr->SetDeleting(false);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user