FIX: auto scroll to visible focus child in params panel

Change-Id: Ib3f7b7528c7fd221a824719d2199b4c85451fe67
This commit is contained in:
chunmao.guo 2022-10-14 15:56:45 +08:00 committed by Lane.Wei
parent 033830f73b
commit 746d5960ba
3 changed files with 58 additions and 2 deletions

View file

@ -1503,8 +1503,14 @@ void Tab::activate_option(const std::string& opt_key, const wxString& category)
Field* field = get_field(opt_key);
// focused selected field
if (field)
if (field) {
set_focus(field->getWindow());
if (!field->getWindow()->HasFocus()) {
wxScrollEvent evt(wxEVT_SCROLL_CHANGED);
evt.SetEventObject(field->getWindow());
wxPostEvent(m_page_view, evt);
}
}
//else if (category == "Single extruder MM setup") {
// // When we show and hide "Single extruder MM setup" page,
// // related options are still in the search list