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

Eeschema, Libedit: fixes color artifacts when moving/placing a pin.

Very minor other fixes.
parent 02bacd66
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -37,6 +37,16 @@ PLOTTER::PLOTTER( )
    negativeMode = false;
}

PLOTTER::~PLOTTER()
{
    // Emergency cleanup, but closing the file is
    // usually made in EndPlot().
    if( outputFile )
    {
        fclose( outputFile );
    }
}

/*
 * Open or create the plot file aFullFilename
 * return true if success, false if the file connot be created/opened
+0 −11
Original line number Diff line number Diff line
@@ -31,18 +31,7 @@
#include <gr_basic.h>
#include <class_drawpanel.h>
#include <wxEeschemaStruct.h>
#include <base_units.h>

#include <general.h>
#include <class_library.h>
#include <sch_bus_entry.h>
#include <sch_component.h>
#include <sch_junction.h>
#include <sch_line.h>
#include <sch_no_connect.h>
#include <sch_polyline.h>
#include <sch_sheet.h>
#include <sch_sheet_path.h>


void DrawDanglingSymbol( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& pos, EDA_COLOR_T Color )
+8 −4
Original line number Diff line number Diff line
@@ -114,8 +114,10 @@ bool LIB_ITEM::operator<( const LIB_ITEM& aOther ) const
}


void LIB_ITEM::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, EDA_COLOR_T aColor,
                     GR_DRAWMODE aDrawMode, void* aData, const TRANSFORM& aTransform )
void LIB_ITEM::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
                     const wxPoint& aOffset, EDA_COLOR_T aColor,
                     GR_DRAWMODE aDrawMode, void* aData,
                     const TRANSFORM& aTransform )
{
    if( InEditMode() )
    {
@@ -131,7 +133,8 @@ void LIB_ITEM::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
        {
            GRSetDrawMode( aDC, g_XorMode );
            drawEditGraphics( aPanel->GetClipBox(), aDC, color );
            drawGraphic( aPanel, aDC, wxPoint( 0, 0 ), color, g_XorMode, aData, aTransform );
            drawGraphic( aPanel, aDC, wxPoint( 0, 0 ), color, g_XorMode, aData,
                         aTransform );
        }
#endif
        // Calculate the new attributes at the current cursor position.
@@ -139,7 +142,8 @@ void LIB_ITEM::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,

        // Draw the items using the new attributes.
        drawEditGraphics( aPanel->GetClipBox(), aDC, color );
        drawGraphic( aPanel, aDC, wxPoint( 0, 0 ), color, g_XorMode, aData, aTransform );
        drawGraphic( aPanel, aDC, wxPoint( 0, 0 ), color, g_XorMode, aData,
                     aTransform );

        m_Fill = fillMode;
    }
+4 −2
Original line number Diff line number Diff line
@@ -1091,8 +1091,10 @@ void LIB_PIN::DrawPinTexts( EDA_DRAW_PANEL* panel,
    if( (Color < 0) && IsSelected() )
        Color = GetItemSelectedColor();

    NameColor = (EDA_COLOR_T) ( Color == -1 ? ReturnLayerColor( LAYER_PINNAM ) : Color );
    NumColor  = (EDA_COLOR_T) ( Color == -1 ? ReturnLayerColor( LAYER_PINNUM ) : Color );
    NameColor = (EDA_COLOR_T) ( Color == UNSPECIFIED_COLOR ?
                                ReturnLayerColor( LAYER_PINNAM ) : Color );
    NumColor  = (EDA_COLOR_T) ( Color == UNSPECIFIED_COLOR ?
                                ReturnLayerColor( LAYER_PINNUM ) : Color );

    /* Create the pin num string */
    ReturnPinStringNum( StringPinNum );
+2 −2
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ void LIB_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& aPosition )
            switch( item->Type() )
            {
            case LIB_PIN_T:
                PlacePin( DC );
                PlacePin();
                break;

            default:
@@ -89,7 +89,7 @@ void LIB_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& aPosition )
        if( no_item_edited )
            CreatePin( DC );
        else
            PlacePin( DC );
            PlacePin();
        break;

    case ID_LIBEDIT_BODY_LINE_BUTT:
Loading