mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-17 19:57:55 -06:00
FIX: [STUDIO-3513] the objectlist always enters wxEVT_SIZE
the objectlist always enters wxEVT_SIZE when scaling Change-Id: I93371cee86437bc0309f041b0d59f28bc3b206aa
This commit is contained in:
parent
2aca9da207
commit
2515a1adf7
2 changed files with 8 additions and 1 deletions
|
@ -272,6 +272,12 @@ ObjectList::ObjectList(wxWindow* parent) :
|
||||||
//Bind(wxCUSTOMEVT_LAST_VOLUME_IS_DELETED, [this](wxCommandEvent& e) { last_volume_is_deleted(e.GetInt()); });
|
//Bind(wxCUSTOMEVT_LAST_VOLUME_IS_DELETED, [this](wxCommandEvent& e) { last_volume_is_deleted(e.GetInt()); });
|
||||||
|
|
||||||
Bind(wxEVT_SIZE, ([this](wxSizeEvent &e) {
|
Bind(wxEVT_SIZE, ([this](wxSizeEvent &e) {
|
||||||
|
if (m_last_size == this->GetSize()) {
|
||||||
|
e.Skip();
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
m_last_size = this->GetSize();
|
||||||
|
}
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
// On GTK, the EnsureVisible call is postponed to Idle processing (see wxDataViewCtrl::m_ensureVisibleDefered).
|
// On GTK, the EnsureVisible call is postponed to Idle processing (see wxDataViewCtrl::m_ensureVisibleDefered).
|
||||||
// So the postponed EnsureVisible() call is planned for an item, which may not exist at the Idle processing time, if this wxEVT_SIZE
|
// So the postponed EnsureVisible() call is planned for an item, which may not exist at the Idle processing time, if this wxEVT_SIZE
|
||||||
|
@ -286,7 +292,7 @@ ObjectList::ObjectList(wxWindow* parent) :
|
||||||
#endif
|
#endif
|
||||||
e.Skip();
|
e.Skip();
|
||||||
}));
|
}));
|
||||||
|
m_last_size = this->GetSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
ObjectList::~ObjectList()
|
ObjectList::~ObjectList()
|
||||||
|
|
|
@ -479,6 +479,7 @@ private:
|
||||||
void apply_object_instance_transfrom_to_all_volumes(ModelObject *model_object, bool need_update_assemble_matrix = true);
|
void apply_object_instance_transfrom_to_all_volumes(ModelObject *model_object, bool need_update_assemble_matrix = true);
|
||||||
|
|
||||||
std::vector<int> m_columns_width;
|
std::vector<int> m_columns_width;
|
||||||
|
wxSize m_last_size;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue