e8d3b68e6b
Create wxPaintDC in onPaint() to acknowledge paint events. Without this, wxWidgets keeps sending paint events because it thinks the window still needs to be painted. This caused continuous repaints in Cairo mode, consuming CPU when dialogs with preview canvases were open. The OpenGL GAL has the same issue but is not affected because wxGLCanvas handles paint events differently via its double-buffering mechanism. Fixes https://gitlab.com/kicad/code/kicad/-/issues/18823