From ca0113ab659b825652545a20a610daa4699f7598 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 28 May 2016 21:51:35 +0200 Subject: [PATCH] Fix my previous commit: I committed the wrong file --- common/gal/opengl/opengl_gal.cpp | 3 +-- pcbnew/pcb_painter.cpp | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 47c77dc3b1..73b1b4f805 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -146,10 +146,9 @@ OPENGL_GAL::~OPENGL_GAL() glDeleteTextures( 1, &fontTexture ); isBitmapFontLoaded = false; } -#ifndef __WIN32__ // FIXME: crashes on W7 - 32 bits + delete OPENGL_GAL::glContext; glContext = NULL; -#endif } } diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 857888d7fd..3d980e1a0a 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -438,7 +438,6 @@ void PCB_PAINTER::draw( const VIA* aVia, int aLayer ) void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) { - VECTOR2D position( aPad->GetPosition() ); PAD_SHAPE_T shape; double m, n; double orientation = aPad->GetOrientation(); @@ -447,6 +446,8 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) // Draw description layer if( IsNetnameLayer( aLayer ) ) { + VECTOR2D position( aPad->ShapePos() ); + // Is anything that we can display enabled? if( m_pcbSettings.m_netNamesOnPads || m_pcbSettings.m_padNumbers ) { @@ -491,7 +492,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) m_gal->SetIsFill( false ); // Set the text position to the pad shape position (the pad position is not the best place) - VECTOR2D textpos( double( aPad->ShapePos().x ), double( aPad->ShapePos().y ) ); + VECTOR2D textpos( 0.0, 0.0 ); // Divide the space, to display both pad numbers and netnames // and set the Y text position to display 2 lines