Search: Fixed "Search" menu item under OSX

+ deleted search combobox
This commit is contained in:
YuSanka 2020-04-22 20:27:42 +02:00
parent 07411e795c
commit b447b45a3e
3 changed files with 5 additions and 10 deletions

View File

@ -734,7 +734,7 @@ void MainFrame::init_menubar()
"", nullptr, [this]() {return !m_plater->model().objects.empty(); }, this);
editMenu->AppendSeparator();
append_menu_item(editMenu, wxID_ANY, _(L("Searc&h")) + "\t" + GUI::shortkey_ctrl_prefix() + "F",
append_menu_item(editMenu, wxID_ANY, _(L("Searc&h")) + "\tCtrl+F",
_(L("Find option")), [this](wxCommandEvent&) { m_plater->search(m_tabpanel->GetCurrentPage() == m_plater); },
"search", nullptr, [this]() {return true; }, this);
}

View File

@ -1094,7 +1094,7 @@ void Sidebar::msw_rescale()
void Sidebar::search_and_apply_tab_search_lines(bool force/* = false*/)
{
if (p->searcher.search(p->search_line, force))
apply_search_line_on_tabs();
;//apply_search_line_on_tabs();
}
void Sidebar::jump_to_option(size_t selected)

View File

@ -159,7 +159,7 @@ void Tab::create_preset_tab()
m_presets_choice = new PresetBitmapComboBox(panel, wxSize(35 * m_em_unit, -1));
// search combox
m_search = new Search::SearchCtrl(panel);
// m_search = new Search::SearchCtrl(panel);
auto color = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
@ -240,16 +240,11 @@ void Tab::create_preset_tab()
m_hsizer->Add(m_btn_hide_incompatible_presets, 0, wxALIGN_CENTER_VERTICAL);
m_hsizer->AddSpacer(int(8 * scale_factor));
m_hsizer->Add(m_question_btn, 0, wxALIGN_CENTER_VERTICAL);
m_hsizer->AddSpacer(int(/*32*/16 * scale_factor));
m_hsizer->AddSpacer(int(32 * scale_factor));
m_hsizer->Add(m_undo_to_sys_btn, 0, wxALIGN_CENTER_VERTICAL);
m_hsizer->Add(m_undo_btn, 0, wxALIGN_CENTER_VERTICAL);
m_hsizer->AddSpacer(int(/*32*/16 * scale_factor));
m_hsizer->AddSpacer(int(48 * scale_factor));
m_hsizer->Add(m_search_btn, 0, wxALIGN_CENTER_VERTICAL);
m_hsizer->AddSpacer(int(/*32*/16 * scale_factor));
m_hsizer->Add(m_search, 0, wxALIGN_CENTER_VERTICAL);
m_hsizer->AddSpacer(int(16 * scale_factor));
// m_hsizer->AddSpacer(int(32 * scale_factor));
// m_hsizer->Add(m_question_btn, 0, wxALIGN_CENTER_VERTICAL);
// m_hsizer->AddStretchSpacer(32);
// StretchSpacer has a strange behavior under OSX, so
// There is used just additional sizer for m_mode_sizer with right alignment