diff --git a/common/gal/opengl/gpu_manager.cpp b/common/gal/opengl/gpu_manager.cpp index ffb12b342b..255d6b0a26 100644 --- a/common/gal/opengl/gpu_manager.cpp +++ b/common/gal/opengl/gpu_manager.cpp @@ -52,7 +52,7 @@ GPU_MANAGER* GPU_MANAGER::MakeManager( VERTEX_CONTAINER* aContainer ) GPU_MANAGER::GPU_MANAGER( VERTEX_CONTAINER* aContainer ) : - m_container( aContainer ), m_shader( NULL ) + m_isDrawing( false ), m_container( aContainer ), m_shader( NULL ) { } diff --git a/common/gal/stroke_font.cpp b/common/gal/stroke_font.cpp index 643ac21b9d..527b9d5122 100644 --- a/common/gal/stroke_font.cpp +++ b/common/gal/stroke_font.cpp @@ -167,7 +167,7 @@ void STROKE_FONT::Draw( std::string aText, const VECTOR2D& aPosition, double aRo switch( m_horizontalJustify ) { case GR_TEXT_HJUSTIFY_CENTER: - m_gal->Translate( VECTOR2D( -textsize.x / 2, 0 ) ); + m_gal->Translate( VECTOR2D( -textsize.x / 2.0, 0 ) ); break; case GR_TEXT_HJUSTIFY_RIGHT: @@ -187,7 +187,7 @@ void STROKE_FONT::Draw( std::string aText, const VECTOR2D& aPosition, double aRo switch( m_verticalJustify ) { case GR_TEXT_VJUSTIFY_CENTER: - m_gal->Translate( VECTOR2D( 0, textsize.y / 2 ) ); + m_gal->Translate( VECTOR2D( 0, textsize.y / 2.0 ) ); break; case GR_TEXT_VJUSTIFY_TOP: diff --git a/common/view/view.cpp b/common/view/view.cpp index ead82c46e8..16953ee1b6 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -474,6 +474,8 @@ struct VIEW::drawItem { GAL* gal = view->GetGAL(); + // Obtain layers that are required to be enabled for drawing an item + // (eg. there is no point in drawing track labels, if the track is not visible) aItem->ViewGetRequiredLayers( layers, layersCount ); // Conditions that have te be fulfilled for an item to be drawn diff --git a/include/gal/opengl/gpu_manager.h b/include/gal/opengl/gpu_manager.h index 5b7e6e62ba..9476bc724c 100644 --- a/include/gal/opengl/gpu_manager.h +++ b/include/gal/opengl/gpu_manager.h @@ -47,7 +47,6 @@ public: virtual ~GPU_MANAGER(); - // TODO docs /** * @brief Initializes everything needed to use vertex buffer objects (should be called when * there is an OpenGL context available). diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index a4933310ef..69e4ae4e53 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -793,7 +793,7 @@ void D_PAD::ViewGetRequiredLayers( int aLayers[], int& aCount ) const } else { - // Resto of pads have one soldermask layer and one description layer + // Rest of pads have one soldermask layer and one description layer aCount -= 2; } }