From bd581566f4d0eb51ce63170110fa639ad8abdb2c Mon Sep 17 00:00:00 2001 From: Douwe Fokkema Date: Mon, 10 Jun 2019 17:00:51 +0200 Subject: [PATCH] Solution for the "rollover problem" Rollover problem is that the AIS target mouse rollover info is distorted when radar window is open. --- src/RadarCanvas.cpp | 1 + src/radar_pi.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/RadarCanvas.cpp b/src/RadarCanvas.cpp index 3161d492..e925b6b5 100644 --- a/src/RadarCanvas.cpp +++ b/src/RadarCanvas.cpp @@ -679,6 +679,7 @@ void RadarCanvas::Render(wxPaintEvent &evt) { glPopAttrib(); glPopMatrix(); + SetCurrent(*m_pi->m_opencpn_gl_context); SwapBuffers(); #ifdef CRASH diff --git a/src/radar_pi.h b/src/radar_pi.h index fa046df7..7cb13146 100644 --- a/src/radar_pi.h +++ b/src/radar_pi.h @@ -690,6 +690,7 @@ class radar_pi : public opencpn_plugin_116, public wxEvtHandler { bool m_predicted_position_initialised; ExtendedPosition m_expected_position; // updated own position at time of last GPS update ExtendedPosition m_last_fixed; // best estimate position at last measurement + wxGLContext *m_opencpn_gl_context; private: bool m_initialized; // True if Init() succeeded and DeInit() not called yet. bool m_first_init; // True in first Init() call. @@ -698,7 +699,6 @@ class radar_pi : public opencpn_plugin_116, public wxEvtHandler { OpenGLMode m_opengl_mode; volatile bool m_opengl_mode_changed; - wxGLContext *m_opencpn_gl_context; bool m_opencpn_gl_context_broken; wxTimer *m_timer;