Pcbnew: Allow changing layer color with left mouse button
Many users, particularly those on laptops, have no middle mouse button, and thus have no way at all to set the layer colors.
This commit is contained in:
parent
e0beb36f1e
commit
b125054afe
|
@ -422,9 +422,9 @@ void LAYER_WIDGET::insertLayerRow( int aRow, const ROW& aSpec )
|
|||
// column 1 (COLUMN_COLORBM)
|
||||
col = COLUMN_COLORBM;
|
||||
wxBitmapButton* bmb = makeColorButton( m_LayerScrolledWindow, aSpec.color, encodeId( col, aSpec.id ) );
|
||||
bmb->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( LAYER_WIDGET::OnLeftDownLayers ), NULL, this );
|
||||
bmb->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( LAYER_WIDGET::OnMiddleDownLayerColor ), NULL, this );
|
||||
bmb->Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( LAYER_WIDGET::OnMiddleDownLayerColor ), NULL, this );
|
||||
bmb->SetToolTip( _("Left click to select, middle click for color change, right click for menu" ) );
|
||||
bmb->SetToolTip( _("Left click for color change, right click for menu" ) );
|
||||
m_LayersFlexGridSizer->wxSizer::Insert( index+col, bmb, 0, flags );
|
||||
|
||||
// column 2 (COLUMN_COLOR_LYR_CB)
|
||||
|
@ -458,8 +458,9 @@ void LAYER_WIDGET::insertRenderRow( int aRow, const ROW& aSpec )
|
|||
if( aSpec.color != -1 )
|
||||
{
|
||||
wxBitmapButton* bmb = makeColorButton( m_RenderScrolledWindow, aSpec.color, encodeId( col, aSpec.id ) );
|
||||
bmb->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( LAYER_WIDGET::OnMiddleDownRenderColor ), NULL, this );
|
||||
bmb->Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( LAYER_WIDGET::OnMiddleDownRenderColor ), NULL, this );
|
||||
bmb->SetToolTip( _( "Middle click for color change" ) );
|
||||
bmb->SetToolTip( _( "Left click for color change" ) );
|
||||
m_RenderFlexGridSizer->wxSizer::Insert( index+col, bmb, 0, flags );
|
||||
|
||||
// could add a left click handler on the color button that toggles checkbox.
|
||||
|
|
Loading…
Reference in New Issue