Fix a minor compil warning. Add a wxASSERT in hierarch.cpp.

This commit is contained in:
jean-pierre charras 2020-01-18 18:21:10 +01:00
parent 462074d471
commit d714773c22
2 changed files with 5 additions and 3 deletions

View File

@ -1,7 +1,7 @@
/*
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 2017-2019 Kicad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2017-2020 Kicad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -154,7 +154,7 @@ void POLYGON_GEOM_MANAGER::updateLeaderPoints( const VECTOR2I& aEndPoint, LEADER
const VECTOR2I line_vec( aEndPoint - last_pt );
// get a restricted 45/H/V line from the last fixed point to the cursor
auto new_end = last_pt + GetVectorSnapped45( line_vec );
OPT_VECTOR2I pt;
OPT_VECTOR2I pt = NULLOPT;
if( m_lockedPoints.SegmentCount() > 1 )
{

View File

@ -3,7 +3,7 @@
*
* Copyright (C) 2004 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
* Copyright (C) 2004-2019 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2004-2020 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -222,6 +222,8 @@ void SCH_EDIT_FRAME::DisplayCurrentSheet()
SCH_SCREEN* screen = g_CurrentSheet->LastScreen();
wxASSERT( screen );
// Switch to current sheet,
// and update the grid size, because it can be modified in latest screen
SetScreen( screen );