mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
Search: 1. The position of the search window is in the middle of the scene.
2. When "Search in English" is checked, then search in English names too. 3. Added score value at the end of option name -> [score_value] 4. Set focus to the Plater, when switch from some tab with focused field to the Plater and search window is shown. 5. For the mode, when settings are in non-modal dialog, neither dialog nor tabpanel doesn't receive wxEVT_KEY_UP event, when some field is selected. So, like a workaround we check wxEVT_KEY_UP event for the Filed and switch between tabs if Ctrl+(1-4) was pressed + PreferencesDialog: fixed a control of the difference in layout modes
This commit is contained in:
@@ -79,6 +79,29 @@ void Field::PostInitialize()
|
||||
m_em_unit = em_unit(m_parent);
|
||||
|
||||
BUILD();
|
||||
|
||||
// For the mode, when settings are in non-modal dialog, neither dialog nor tabpanel doesn't receive wxEVT_KEY_UP event, when some field is selected.
|
||||
// So, like a workaround check wxEVT_KEY_UP event for the Filed and switch between tabs if Ctrl+(1-4) was pressed
|
||||
if (getWindow())
|
||||
getWindow()->Bind(wxEVT_KEY_UP, [](wxKeyEvent& evt) {
|
||||
if ((evt.GetModifiers() & wxMOD_CONTROL) != 0) {
|
||||
int tab_id = -1;
|
||||
switch (evt.GetKeyCode()) {
|
||||
case '1': { tab_id = 0; break; }
|
||||
case '2': { tab_id = 1; break; }
|
||||
case '3': { tab_id = 2; break; }
|
||||
case '4': { tab_id = 3; break; }
|
||||
default: break;
|
||||
}
|
||||
if (tab_id >= 0)
|
||||
wxGetApp().mainframe->select_tab(tab_id);
|
||||
if (tab_id > 0)
|
||||
// tab panel should be focused for correct navigation between tabs
|
||||
wxGetApp().tab_panel()->SetFocus();
|
||||
}
|
||||
|
||||
evt.Skip();
|
||||
});
|
||||
}
|
||||
|
||||
// Values of width to alignments of fields
|
||||
@@ -397,7 +420,7 @@ void TextCtrl::BUILD() {
|
||||
bKilledFocus = false;
|
||||
#endif // __WXOSX__
|
||||
}), temp->GetId());
|
||||
|
||||
/*
|
||||
// select all text using Ctrl+A
|
||||
temp->Bind(wxEVT_CHAR, ([temp](wxKeyEvent& event)
|
||||
{
|
||||
@@ -405,7 +428,7 @@ void TextCtrl::BUILD() {
|
||||
temp->SetSelection(-1, -1); //select all
|
||||
event.Skip();
|
||||
}));
|
||||
|
||||
*/
|
||||
// recast as a wxWindow to fit the calling convention
|
||||
window = dynamic_cast<wxWindow*>(temp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user