Added suppress_snapshots() and allow_snapshots() for avoid of excess "snapshoting"
This commit is contained in:
parent
f964f5e99a
commit
a6a5b94155
3 changed files with 31 additions and 3 deletions
src/slic3r/GUI
|
@ -66,11 +66,14 @@ static int extruders_count()
|
|||
return wxGetApp().extruders_cnt();
|
||||
}
|
||||
|
||||
static void take_snapshot(const wxString& snapshot_name)
|
||||
static void take_snapshot(const wxString& snapshot_name)
|
||||
{
|
||||
wxGetApp().plater()->take_snapshot(snapshot_name);
|
||||
}
|
||||
|
||||
static void suppress_snapshots(){ wxGetApp().plater()->suppress_snapshots(); }
|
||||
static void allow_snapshots() { wxGetApp().plater()->allow_snapshots(); }
|
||||
|
||||
ObjectList::ObjectList(wxWindow* parent) :
|
||||
wxDataViewCtrl(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_MULTIPLE),
|
||||
m_parent(parent)
|
||||
|
@ -2333,6 +2336,9 @@ void ObjectList::remove()
|
|||
|
||||
wxDataViewItem parent = wxDataViewItem(0);
|
||||
|
||||
take_snapshot(_(L("Delete Selected")));
|
||||
suppress_snapshots();
|
||||
|
||||
for (auto& item : sels)
|
||||
{
|
||||
if (m_objects_model->GetParent(item) == wxDataViewItem(0))
|
||||
|
@ -2353,6 +2359,8 @@ void ObjectList::remove()
|
|||
|
||||
if (parent)
|
||||
select_item(parent);
|
||||
|
||||
allow_snapshots();
|
||||
}
|
||||
|
||||
void ObjectList::del_layer_range(const t_layer_height_range& range)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue