DIALOG_PIN_PROPERTIES: shows the pin connect point, like in symbol editor.
(See commit 2817c)
This commit is contained in:
parent
19607f1488
commit
bd72f7a054
|
@ -349,6 +349,7 @@ void DIALOG_PIN_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event )
|
|||
|
||||
PART_DRAW_OPTIONS opts;
|
||||
opts.draw_hidden_fields = true;
|
||||
opts.show_connect_point = true;
|
||||
|
||||
RENDER_SETTINGS* renderSettings = symbolEditor->GetRenderSettings();
|
||||
renderSettings->SetPrintDC( &dc );
|
||||
|
|
|
@ -174,6 +174,7 @@ void LIB_PIN::print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset, v
|
|||
PART_DRAW_OPTIONS* opts = (PART_DRAW_OPTIONS*) aData;
|
||||
bool drawHiddenFields = opts ? opts->draw_hidden_fields : false;
|
||||
bool showPinType = opts ? opts->show_elec_type : false;
|
||||
bool show_connect_point = opts ? opts->show_connect_point : false;
|
||||
|
||||
LIB_PART* part = GetParent();
|
||||
|
||||
|
@ -192,6 +193,13 @@ void LIB_PIN::print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset, v
|
|||
|
||||
if( showPinType )
|
||||
printPinElectricalTypeName( aSettings, pos1, orient );
|
||||
|
||||
if( show_connect_point )
|
||||
{
|
||||
wxDC* DC = aSettings->GetPrintDC();
|
||||
COLOR4D color = aSettings->GetLayerColor( IsVisible() ? LAYER_PIN : LAYER_HIDDEN );
|
||||
GRCircle( nullptr, DC, pos1.x, pos1.y, TARGET_PIN_RADIUS, 0, color );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -61,10 +61,12 @@ extern bool operator<( const LIB_PART& aItem1, const LIB_PART& aItem2 );
|
|||
|
||||
struct PART_DRAW_OPTIONS
|
||||
{
|
||||
TRANSFORM transform; // Coordinate adjustment settings
|
||||
bool draw_visible_fields; // Whether to draw "visible" fields
|
||||
bool draw_hidden_fields; // Whether to draw "hidden" fields
|
||||
bool show_elec_type; // Whether to show the pin electrical type
|
||||
TRANSFORM transform; // Coordinate adjustment settings
|
||||
bool draw_visible_fields; // Whether to draw "visible" fields
|
||||
bool draw_hidden_fields; // Whether to draw "hidden" fields
|
||||
bool show_elec_type; // Whether to show the pin electrical type
|
||||
bool show_connect_point; // Whether to show the pin connect point marker (small circle)
|
||||
// usefull in dialog pin properties
|
||||
|
||||
PART_DRAW_OPTIONS()
|
||||
{
|
||||
|
@ -72,6 +74,7 @@ struct PART_DRAW_OPTIONS
|
|||
draw_visible_fields = true;
|
||||
draw_hidden_fields = true;
|
||||
show_elec_type = false;
|
||||
show_connect_point = false;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue