Commit 675f8d4a authored by Lorenzo Marcantonio's avatar Lorenzo Marcantonio
Browse files

Typedef STATUS_FLAGS to encapsulate EDA_ITEM bitmapped flags

parent cd18ff17
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -195,7 +195,7 @@ UNDO_REDO_T PICKED_ITEMS_LIST::GetPickedItemStatus( unsigned int aIdx )
}
}




int PICKED_ITEMS_LIST::GetPickerFlags( unsigned aIdx )
STATUS_FLAGS PICKED_ITEMS_LIST::GetPickerFlags( unsigned aIdx )
{
{
    if( aIdx < m_ItemsList.size() )
    if( aIdx < m_ItemsList.size() )
        return m_ItemsList[aIdx].GetFlags();
        return m_ItemsList[aIdx].GetFlags();
@@ -253,7 +253,7 @@ bool PICKED_ITEMS_LIST::SetPickedItemStatus( UNDO_REDO_T aStatus, unsigned aIdx
}
}




bool PICKED_ITEMS_LIST::SetPickerFlags( int aFlags, unsigned aIdx )
bool PICKED_ITEMS_LIST::SetPickerFlags( STATUS_FLAGS aFlags, unsigned aIdx )
{
{
    if( aIdx < m_ItemsList.size() )
    if( aIdx < m_ItemsList.size() )
    {
    {
+1 −1
Original line number Original line Diff line number Diff line
@@ -85,7 +85,7 @@ static void moveBitmap( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosit
        dirty.Inflate( 4 );     // Give a margin
        dirty.Inflate( 4 );     // Give a margin
        aPanel->SetMouseCapture( NULL, NULL );  // Avoid loop in redraw panel
        aPanel->SetMouseCapture( NULL, NULL );  // Avoid loop in redraw panel


        int flgs = image->GetFlags();
        STATUS_FLAGS flgs = image->GetFlags();
        image->ClearFlags();
        image->ClearFlags();
        aPanel->RefreshDrawingRect( dirty );
        aPanel->RefreshDrawingRect( dirty );
        image->SetFlags( flgs );
        image->SetFlags( flgs );
+2 −2
Original line number Original line Diff line number Diff line
@@ -360,7 +360,7 @@ void SCH_EDIT_FRAME::OnSelectUnit( wxCommandEvent& aEvent )
    if( unit > unitCount )
    if( unit > unitCount )
        unit = unitCount;
        unit = unitCount;


    int flags = component->GetFlags();
    STATUS_FLAGS flags = component->GetFlags();


    if( !flags )    // No command in progress: save in undo list
    if( !flags )    // No command in progress: save in undo list
        SaveCopyInUndoList( component, UR_CHANGED );
        SaveCopyInUndoList( component, UR_CHANGED );
@@ -405,7 +405,7 @@ void SCH_EDIT_FRAME::ConvertPart( SCH_COMPONENT* DrawComponent, wxDC* DC )
        return;
        return;
    }
    }


    int flags = DrawComponent->GetFlags();
    STATUS_FLAGS flags = DrawComponent->GetFlags();


    if( DrawComponent->GetFlags() )
    if( DrawComponent->GetFlags() )
        DrawComponent->Draw( m_canvas, DC, wxPoint( 0, 0 ), g_XorMode, g_GhostColor );
        DrawComponent->Draw( m_canvas, DC, wxPoint( 0, 0 ), g_XorMode, g_GhostColor );
+1 −1
Original line number Original line Diff line number Diff line
@@ -574,7 +574,7 @@ wxString LIB_ARC::GetSelectMenuText() const
}
}




void LIB_ARC::BeginEdit( int aEditMode, const wxPoint aPosition )
void LIB_ARC::BeginEdit( STATUS_FLAGS aEditMode, const wxPoint aPosition )
{
{
    wxCHECK_RET( ( aEditMode & ( IS_NEW | IS_MOVED | IS_RESIZED ) ) != 0,
    wxCHECK_RET( ( aEditMode & ( IS_NEW | IS_MOVED | IS_RESIZED ) ) != 0,
                 wxT( "Invalid edit mode for LIB_ARC object." ) );
                 wxT( "Invalid edit mode for LIB_ARC object." ) );
+1 −1
Original line number Original line Diff line number Diff line
@@ -110,7 +110,7 @@ public:


    int GetPenSize() const;
    int GetPenSize() const;


    void BeginEdit( int aEditMode, const wxPoint aStartPoint = wxPoint( 0, 0 ) );
    void BeginEdit( STATUS_FLAGS aEditMode, const wxPoint aStartPoint = wxPoint( 0, 0 ) );


    bool ContinueEdit( const wxPoint aNextPoint );
    bool ContinueEdit( const wxPoint aNextPoint );


Loading