FIX: Delete and search object outside the plate

JIRA:
1. STUDIO-5132 Deleting object outside the plate will crash
2. STUDIO-5146 The search function cannot search for object outside the plate

Signed-off-by: Kunlong Ma <kunlong.ma@bambulab.com>
Change-Id: I84cb3fe990a9c2a182e7434c262466a70545280e
This commit is contained in:
Kunlong Ma
2023-11-07 17:20:25 +08:00
committed by Lane.Wei
parent 3fe19f87f3
commit 939f64d90d
5 changed files with 43 additions and 30 deletions

View File

@@ -186,7 +186,6 @@ private:
wxDataViewItem m_last_selected_item {nullptr};
wxDataViewItemArray m_found_list;
#ifdef __WXMSW__
// Workaround for entering the column editing mode on Windows. Simulate keyboard enter when another column of the active line is selected.
int m_last_selected_column = -1;
@@ -217,8 +216,7 @@ public:
std::vector<ModelObject*>* objects() const { return m_objects; }
ModelObject* object(const int obj_idx) const ;
wxDataViewItemArray get_found_list() const { return m_found_list; }
void create_objects_ctrl();
// BBS
@@ -460,7 +458,6 @@ public:
// search objectlist
void search_object_list();
void append_found_list(wxString current_search_text, wxDataViewItem item);
void set_found_list(wxString current_search_text);
void set_cur_pos(int value);
void searchbar_kill_focus();