Make spectrum mouse wheel zoom feature universal

This commit is contained in:
Charles J. Cliffe 2016-05-30 19:45:38 -04:00
parent b8568639c3
commit 649d34f811
3 changed files with 6 additions and 3 deletions

View File

@ -1491,7 +1491,7 @@ void AppFrame::OnIdle(wxIdleEvent& event) {
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
if (scopeCanvas->HasFocus() || spectrumCanvas->HasFocus()) { if (scopeCanvas->HasFocus()) {
waterfallCanvas->SetFocus(); waterfallCanvas->SetFocus();
} }
#endif #endif

View File

@ -248,6 +248,9 @@ void SpectrumCanvas::OnMouseDown(wxMouseEvent& event) {
void SpectrumCanvas::OnMouseWheelMoved(wxMouseEvent& event) { void SpectrumCanvas::OnMouseWheelMoved(wxMouseEvent& event) {
InteractiveCanvas::OnMouseWheelMoved(event); InteractiveCanvas::OnMouseWheelMoved(event);
if (waterfallCanvas) {
waterfallCanvas->OnMouseWheelMoved(event);
}
} }
void SpectrumCanvas::OnMouseReleased(wxMouseEvent& event) { void SpectrumCanvas::OnMouseReleased(wxMouseEvent& event) {

View File

@ -35,7 +35,8 @@ public:
void OnKeyDown(wxKeyEvent& event); void OnKeyDown(wxKeyEvent& event);
void OnKeyUp(wxKeyEvent& event); void OnKeyUp(wxKeyEvent& event);
void OnMouseWheelMoved(wxMouseEvent& event);
private: private:
void OnPaint(wxPaintEvent& event); void OnPaint(wxPaintEvent& event);
void OnIdle(wxIdleEvent &event); void OnIdle(wxIdleEvent &event);
@ -43,7 +44,6 @@ private:
void updateHoverState(); void updateHoverState();
void OnMouseMoved(wxMouseEvent& event); void OnMouseMoved(wxMouseEvent& event);
void OnMouseWheelMoved(wxMouseEvent& event);
void OnMouseDown(wxMouseEvent& event); void OnMouseDown(wxMouseEvent& event);
void OnMouseReleased(wxMouseEvent& event); void OnMouseReleased(wxMouseEvent& event);
void OnMouseRightDown(wxMouseEvent& event); void OnMouseRightDown(wxMouseEvent& event);