mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Added InvalidItem() to ObjectDataViewModel to controling if item till exist during multiple deleting
+ some code cleaning
This commit is contained in:
parent
6ab1cec48c
commit
eaccd73756
3 changed files with 30 additions and 29 deletions
|
@ -1325,6 +1325,18 @@ int ObjectDataViewModel::GetRowByItem(const wxDataViewItem& item) const
|
|||
return -1;
|
||||
}
|
||||
|
||||
bool ObjectDataViewModel::InvalidItem(const wxDataViewItem& item)
|
||||
{
|
||||
if (!item)
|
||||
return true;
|
||||
|
||||
ObjectDataViewModelNode* node = (ObjectDataViewModelNode*)item.GetID();
|
||||
if (!node || node->invalid())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
wxString ObjectDataViewModel::GetName(const wxDataViewItem &item) const
|
||||
{
|
||||
ObjectDataViewModelNode *node = (ObjectDataViewModelNode*)item.GetID();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue