Suppress to show Search window on the Plater using Ctrl+F shortcut, when we are at Preview mode
This commit is contained in:
parent
4496e2a8ce
commit
8bc23c90fc
@ -1151,7 +1151,7 @@ void MainFrame::init_menubar_as_editor()
|
|||||||
|
|
||||||
editMenu->AppendSeparator();
|
editMenu->AppendSeparator();
|
||||||
append_menu_item(editMenu, wxID_ANY, _L("Searc&h") + "\tCtrl+F",
|
append_menu_item(editMenu, wxID_ANY, _L("Searc&h") + "\tCtrl+F",
|
||||||
_L("Search in settings"), [this](wxCommandEvent&) { m_plater->search(/*m_tabpanel->GetCurrentPage() == */m_plater->IsShown()); },
|
_L("Search in settings"), [this](wxCommandEvent&) { m_plater->search(m_plater->IsShown()); },
|
||||||
"search", nullptr, []() {return true; }, this);
|
"search", nullptr, []() {return true; }, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5858,6 +5858,8 @@ void Plater::paste_from_clipboard()
|
|||||||
void Plater::search(bool plater_is_active)
|
void Plater::search(bool plater_is_active)
|
||||||
{
|
{
|
||||||
if (plater_is_active) {
|
if (plater_is_active) {
|
||||||
|
if (is_preview_shown())
|
||||||
|
return;
|
||||||
// plater should be focused for correct navigation inside search window
|
// plater should be focused for correct navigation inside search window
|
||||||
this->SetFocus();
|
this->SetFocus();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user