More encapsulation work and other minor improvements.
* EDA_RECT and EDA_ITEM completely encapsulated. * Removed unnecessary EDA_ITEM member m_Selected and replaced functionality with SELECTED flag bit.
This commit is contained in:
@@ -1,3 +1,28 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2004 Jean-Pierre Charras, [email protected]
|
||||
* Copyright (C) 2011 Wayne Stambaugh <[email protected]>
|
||||
* Copyright (C) 2004-2011 KiCad Developers, see change_log.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
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you may find one here:
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file block_commande.cpp
|
||||
* @brief Common routines for managing on block commands.
|
||||
@@ -155,7 +180,7 @@ void BLOCK_SELECTOR::ClearListAndDeleteItems()
|
||||
*/
|
||||
void BLOCK_SELECTOR::PushItem( ITEM_PICKER& aItem )
|
||||
{
|
||||
m_ItemsSelection.PushItem( aItem );
|
||||
m_ItemsSelection.PushItem( aItem );
|
||||
}
|
||||
|
||||
|
||||
@@ -181,7 +206,7 @@ bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* DC, int key, const wxPoint& startpo
|
||||
if( ( Block->m_Command != BLOCK_IDLE ) || ( Block->m_State != STATE_NO_BLOCK ) )
|
||||
return false;
|
||||
|
||||
Block->m_Flags = 0;
|
||||
Block->ClearFlags();
|
||||
Block->m_Command = (CmdBlockType) ReturnBlockCommand( key );
|
||||
|
||||
if( Block->m_Command == 0 )
|
||||
@@ -298,7 +323,7 @@ void AbortBlockCurrentCommand( EDA_DRAW_PANEL* Panel, wxDC* DC )
|
||||
screen->m_BlockLocate.ClearItemsList();
|
||||
}
|
||||
|
||||
screen->m_BlockLocate.m_Flags = 0;
|
||||
screen->m_BlockLocate.ClearFlags();
|
||||
screen->m_BlockLocate.m_State = STATE_NO_BLOCK;
|
||||
screen->m_BlockLocate.m_Command = BLOCK_ABORT;
|
||||
Panel->GetParent()->HandleBlockEnd( DC );
|
||||
|
||||
Reference in New Issue
Block a user