Commit 5d5a50dd authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Eeschema: fix a bug which crashes Eeschema (when a label is being created, and...

Eeschema: fix a bug which crashes Eeschema (when a label is being created, and its type is changed  by popup menu, for instance to a text, before it was put on schematic)
remove unused file and minor coding style fix
parent 2bea1c67
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -223,8 +223,18 @@ void SCH_EDIT_FRAME::OnConvertTextType( wxCommandEvent& aEvent )
    m_canvas->CrossHairOff( &dc );   // Erase schematic cursor
    text->Draw( m_canvas, &dc, wxPoint( 0, 0 ), g_XorMode );

    // For an exiting item (i.e. already in list):
    // replace the existing item by the new text in list
    for( SCH_ITEM* item = screen->GetDrawItems(); item != NULL; item = item->Next() )
    {
        if( item == text )
        {
            screen->Remove( text );
            screen->Append( newtext );
            break;
        }
    }

    m_itemToRepeat = NULL;
    OnModify();
    newtext->Draw( m_canvas, &dc, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
@@ -246,7 +256,7 @@ void SCH_EDIT_FRAME::OnConvertTextType( wxCommandEvent& aEvent )
    // So this is equivalent to delete text and add newtext
    // If text if being currently edited (i.e. moved)
    // we also save the initial copy of text, and prepare undo command for new text modifications.
    // we must save it as modified text (if currently beeing edited), then deleted text,
    // we must save it as modified text,if it is currently edited, then save as deleted text,
    // and replace text with newtext
    PICKED_ITEMS_LIST pickList;
    ITEM_PICKER picker( text, UR_CHANGED );
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ class CONNECTED_POINT
{
private:
    BOARD_CONNECTED_ITEM * m_item;  // a link to the parent item (track, via or pad)
    wxPoint m_point;                // the connection point (coordinate of this point)
    wxPoint m_point;                // coordinates of this connected point

public:
    // ctor to build a CONNECTED_POINT instance, when the parent is a track or via
+0 −679

File deleted.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ void MIN_SPAN_TREE_PADS::AddTreeToRatsnest( std::vector<RATSNEST_ITEM> &aRatsnes
int MIN_SPAN_TREE_PADS::GetWeight( int aItem1, int aItem2 )
{
    // NOTE: The distance (weight) between a node and itself should be 0
    // so we add 1 to other distances th be sure we never have 0
    // so we add 1 to other distances to be sure we never have 0
    // in cases other than a node and itself

    D_PAD* pad1 = (*m_PadsList)[aItem1];
+28 −23
Original line number Diff line number Diff line
@@ -77,12 +77,14 @@ void FOOTPRINT_EDIT_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
    }

#ifdef USE_WX_OVERLAY

    if( IsShown() )
    {
        m_overlay.Reset();
        wxDCOverlay overlaydc( m_overlay, (wxWindowDC*) DC );
        overlaydc.Clear();
    }

#endif

    if( m_canvas->IsMouseCaptured() )
@@ -114,12 +116,14 @@ void PCB_EDIT_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
    DrawGeneralRatsnest( DC );

#ifdef USE_WX_OVERLAY

    if( IsShown() )
    {
        m_overlay.Reset();
        wxDCOverlay overlaydc( m_overlay, (wxWindowDC*) DC );
        overlaydc.Clear();
    }

#endif

    if( m_canvas->IsMouseCaptured() )
@@ -212,6 +216,7 @@ void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* DC, GR_DRAWMODE aDrawMode, const
        {
            if( module->GetLayer() == LAYER_N_BACK )
                display = false;

            layerMask &= ~LAYER_BACK;
        }

Loading