mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-10 08:17:51 -06:00
FIX:fix search dialog cannot dismiss when alt+tab
Change-Id: I2fd0099685ce80e72f6214643b35535c274f7e22
This commit is contained in:
parent
5f2a537f14
commit
fafff5c1d1
2 changed files with 6 additions and 2 deletions
|
@ -623,6 +623,7 @@ void SearchDialog::Popup(wxPoint position /*= wxDefaultPosition*/)
|
|||
//const std::string &line = searcher->search_string();
|
||||
//searcher->search(into_u8(line), true);
|
||||
wxPopupTransientWindow::Popup();
|
||||
search_line->SetFocus();
|
||||
update_list();
|
||||
}
|
||||
|
||||
|
@ -638,7 +639,11 @@ void SearchDialog::OnDismiss() { }
|
|||
void SearchDialog::Dismiss()
|
||||
{
|
||||
auto pos = wxGetMousePosition();
|
||||
if (!m_event_tag->GetScreenRect().Contains(pos) && !this->GetScreenRect().Contains(pos) && !m_search_item_tag->GetScreenRect().Contains(pos)) {
|
||||
|
||||
if (!search_line->HasFocus() && !this->HasFocus()) {
|
||||
Die();
|
||||
}
|
||||
else if (!m_event_tag->GetScreenRect().Contains(pos) && !this->GetScreenRect().Contains(pos) && !m_search_item_tag->GetScreenRect().Contains(pos)) {
|
||||
Die();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue