mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Implemented blinking icon to highlight a searched field
This commit is contained in:
parent
2317437ede
commit
752083cbe6
6 changed files with 59 additions and 18 deletions
|
@ -69,6 +69,13 @@ Tab::Tab(wxNotebook* parent, const wxString& title, Preset::Type type) :
|
|||
page->layout_valid = false;
|
||||
evt.Skip();
|
||||
}));
|
||||
|
||||
this->m_highlighting_timer.SetOwner(this, 0);
|
||||
this->Bind(wxEVT_TIMER, [this](wxTimerEvent&)
|
||||
{
|
||||
if (!m_highlighter.blink())
|
||||
m_highlighting_timer.Stop();
|
||||
});
|
||||
}
|
||||
|
||||
void Tab::set_type()
|
||||
|
@ -992,8 +999,11 @@ void Tab::activate_option(const std::string& opt_key, const wxString& category)
|
|||
tap_panel->SetSelection(page_id);
|
||||
|
||||
// focused selected field
|
||||
if (field)
|
||||
if (field) {
|
||||
field->getWindow()->SetFocus();
|
||||
m_highlighting_timer.Start(500, false);
|
||||
m_highlighter.init(field);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue