← Back to team overview

kicad-developers team mailing list archive

[PATCH] Init OPENGL_GAL currentTarget

 

Hi,

This patch initialises a class member in OPENGL_GAL. It uses the
SetTarget function to make  sure the target and manager initialise in
a consistent way.

Cheers,

John
From f9a0fc626f78337165595f18f4dca73afa11a9af Mon Sep 17 00:00:00 2001
From: John Beard <john.j.beard@xxxxxxxxx>
Date: Mon, 23 Jan 2017 13:19:10 +0800
Subject: [PATCH] OPENGL_GAL: Init currentTarget

The currentTarget member of OPENGL_GAL is not initialised, but the
currentManager member is.

This commit uses SetTarget to initialise both target and manager to a
consistent state at construction.
---
 common/gal/opengl/opengl_gal.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp
index 4e64d0e04..862a783da 100644
--- a/common/gal/opengl/opengl_gal.cpp
+++ b/common/gal/opengl/opengl_gal.cpp
@@ -139,7 +139,7 @@ OPENGL_GAL::OPENGL_GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions, wxWindow* aParent,
 
     gluTessProperty( tesselator, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_POSITIVE );
 
-    currentManager = nonCachedManager;
+    SetTarget( TARGET_NONCACHED );
 }
 
 
-- 
2.11.0