Merge lp:~cern-kicad/kicad/opengl_context_fix into lp:kicad/product

Proposed by Maciej Suminski
Status: Merged
Approved by: Wayne Stambaugh
Approved revision: 4522
Merged at revision: 4544
Proposed branch: lp:~cern-kicad/kicad/opengl_context_fix
Merge into: lp:kicad/product
Diff against target: 46 lines (+14/-0)
3 files modified
common/drawpanel_gal.cpp (+7/-0)
include/class_drawpanel_gal.h (+6/-0)
pcbnew/pcbframe.cpp (+1/-0)
To merge this branch: bzr merge lp:~cern-kicad/kicad/opengl_context_fix
Reviewer Review Type Date Requested Status
Wayne Stambaugh Pending
Review via email: mp+197913@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Merge request committed to testing branch r4544.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'common/drawpanel_gal.cpp'
2--- common/drawpanel_gal.cpp 2013-11-11 09:48:49 +0000
3+++ common/drawpanel_gal.cpp 2013-12-05 16:08:27 +0000
4@@ -184,6 +184,13 @@
5 }
6
7
8+void EDA_DRAW_PANEL_GAL::StopDrawing()
9+{
10+ Disconnect( wxEVT_PAINT, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this );
11+ m_refreshTimer.Stop();
12+}
13+
14+
15 void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType )
16 {
17 // Protect from refreshing during backend switch
18
19=== modified file 'include/class_drawpanel_gal.h'
20--- include/class_drawpanel_gal.h 2013-11-11 12:47:08 +0000
21+++ include/class_drawpanel_gal.h 2013-12-05 16:08:27 +0000
22@@ -111,6 +111,12 @@
23 m_eventDispatcher = aEventDispatcher;
24 }
25
26+ /**
27+ * Function StopDrawing()
28+ * Prevents the GAL canvas from further drawing till it is recreated.
29+ */
30+ void StopDrawing();
31+
32 protected:
33 void onPaint( wxPaintEvent& WXUNUSED( aEvent ) );
34 void onSize( wxSizeEvent& aEvent );
35
36=== modified file 'pcbnew/pcbframe.cpp'
37--- pcbnew/pcbframe.cpp 2013-11-27 13:20:42 +0000
38+++ pcbnew/pcbframe.cpp 2013-12-05 16:08:27 +0000
39@@ -556,6 +556,7 @@
40 void PCB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event )
41 {
42 m_canvas->SetAbortRequest( true );
43+ m_galCanvas->StopDrawing();
44
45 if( GetScreen()->IsModify() )
46 {