diff --git a/src/gui/control/native_look_editor.cpp b/src/gui/control/native_look_editor.cpp index d08d6888..697d84b1 100644 --- a/src/gui/control/native_look_editor.cpp +++ b/src/gui/control/native_look_editor.cpp @@ -131,10 +131,16 @@ void NativeLookEditor::onScroll(wxScrollWinEvent& ev) { } } void NativeLookEditor::onMouseWheel(wxMouseEvent& ev) { - if (current_editor) { - bool scrolled = current_editor->onMouseWheel(mousePoint(ev), ev); - if (scrolled) return; + // send scroll event to field under cursor + RealPoint pos = mousePoint(ev); + FOR_EACH_EDITOR_REVERSE { // find high z index fields first + if (v->containsPoint(pos) && v->getField()->editable) { + bool scrolled = e->onMouseWheel(mousePoint(ev), ev); + if (scrolled) return; + break; + } } + // scroll entire window int toScroll = 10 * ev.GetWheelRotation() * ev.GetLinesPerAction() / ev.GetWheelDelta(); // note: up is positive int y = GetScrollPos(wxVERTICAL); scrollTo(wxVERTICAL, y - toScroll); diff --git a/src/gui/set/set_info_panel.cpp b/src/gui/set/set_info_panel.cpp index 161a90a4..11ab0db4 100644 --- a/src/gui/set/set_info_panel.cpp +++ b/src/gui/set/set_info_panel.cpp @@ -45,6 +45,8 @@ void SetInfoPanel::initUI(wxToolBar* tb, wxMenuBar* mb) { menuFormat->Append(ID_FORMAT_SYMBOL, _("symbol"), _MENU_("symbols"), _HELP_("symbols"), wxITEM_CHECK); menuFormat->Append(ID_FORMAT_REMINDER, _("reminder"), _MENU_("reminder text"), _HELP_("reminder text"), wxITEM_CHECK); mb->Insert(2, menuFormat, _MENU_("format")); + // focus on editor + editor->SetFocus(); } void SetInfoPanel::destroyUI(wxToolBar* tb, wxMenuBar* mb) {