Loading pcbnew/layer_widget.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -174,7 +174,7 @@ int LAYER_WIDGET::encodeId( int aColumn, int aId ) } int LAYER_WIDGET::getDecodedId( int aControlId ) LAYER_NUM LAYER_WIDGET::getDecodedId( int aControlId ) { int id = aControlId / LYR_COLUMN_COUNT; // rounding is OK. return id; Loading Loading @@ -319,7 +319,7 @@ void LAYER_WIDGET::OnMiddleDownRenderColor( wxMouseEvent& event ) wxBitmap bm = makeBitmap( newColor ); eventSource->SetBitmapLabel( bm ); int id = getDecodedId( eventSource->GetId() ); LAYER_NUM id = getDecodedId( eventSource->GetId() ); // tell the client code. OnRenderColorChange( id, newColor ); Loading @@ -331,7 +331,7 @@ void LAYER_WIDGET::OnMiddleDownRenderColor( wxMouseEvent& event ) void LAYER_WIDGET::OnRenderCheckBox( wxCommandEvent& event ) { wxCheckBox* eventSource = (wxCheckBox*) event.GetEventObject(); int id = getDecodedId( eventSource->GetId() ); LAYER_NUM id = getDecodedId( eventSource->GetId() ); OnRenderEnable( id, eventSource->IsChecked() ); passOnFocus(); } Loading Loading @@ -398,7 +398,7 @@ int LAYER_WIDGET::findRenderRow( int aId ) const void LAYER_WIDGET::insertLayerRow( int aRow, const ROW& aSpec ) { wxASSERT( aRow >= 0 && aRow < MAX_LAYER_ROWS ); wxASSERT( aRow >= 0 ); int col; int index = aRow * LYR_COLUMN_COUNT; Loading Loading @@ -440,7 +440,7 @@ void LAYER_WIDGET::insertLayerRow( int aRow, const ROW& aSpec ) void LAYER_WIDGET::insertRenderRow( int aRow, const ROW& aSpec ) { wxASSERT( aRow >= 0 && aRow < MAX_LAYER_ROWS ); wxASSERT( aRow >= 0 ); int col; int index = aRow * RND_COLUMN_COUNT; Loading pcbnew/layer_widget.h +8 −4 Original line number Diff line number Diff line Loading @@ -62,6 +62,10 @@ * <p> void OnLayerVisible( int aLayer, bool isVisible ); * <p> void OnRenderColorChange( int id, int aColor ); * <p> void OnRenderEnable( int id, bool isEnabled ); * * Please note that even if designed toward layers, it is used to * contain other stuff, too (the second page in pcbnew contains render * items, for example) */ class LAYER_WIDGET : public wxPanel { Loading Loading @@ -133,9 +137,11 @@ protected: /** * Function getDecodedId * decodes \a aControlId to original un-encoded value. * decodes \a aControlId to original un-encoded value. This of * course holds iff encodedId was called with a LAYER_NUM (this box * is used for other things than layers, too) */ static int getDecodedId( int aControlId ); static LAYER_NUM getDecodedId( int aControlId ); /** * Function makeColorButton Loading Loading @@ -243,8 +249,6 @@ public: */ void AppendLayerRow( const ROW& aRow ); #define MAX_LAYER_ROWS 64 ///< cannot append more than this number of rows /** * Function AppendLayerRows * appends new rows in the layer portion of the widget. The user must Loading 3d-viewer/3d_draw.cpp +2 −2 File changed.Contains only whitespace changes. Show changes Loading
pcbnew/layer_widget.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -174,7 +174,7 @@ int LAYER_WIDGET::encodeId( int aColumn, int aId ) } int LAYER_WIDGET::getDecodedId( int aControlId ) LAYER_NUM LAYER_WIDGET::getDecodedId( int aControlId ) { int id = aControlId / LYR_COLUMN_COUNT; // rounding is OK. return id; Loading Loading @@ -319,7 +319,7 @@ void LAYER_WIDGET::OnMiddleDownRenderColor( wxMouseEvent& event ) wxBitmap bm = makeBitmap( newColor ); eventSource->SetBitmapLabel( bm ); int id = getDecodedId( eventSource->GetId() ); LAYER_NUM id = getDecodedId( eventSource->GetId() ); // tell the client code. OnRenderColorChange( id, newColor ); Loading @@ -331,7 +331,7 @@ void LAYER_WIDGET::OnMiddleDownRenderColor( wxMouseEvent& event ) void LAYER_WIDGET::OnRenderCheckBox( wxCommandEvent& event ) { wxCheckBox* eventSource = (wxCheckBox*) event.GetEventObject(); int id = getDecodedId( eventSource->GetId() ); LAYER_NUM id = getDecodedId( eventSource->GetId() ); OnRenderEnable( id, eventSource->IsChecked() ); passOnFocus(); } Loading Loading @@ -398,7 +398,7 @@ int LAYER_WIDGET::findRenderRow( int aId ) const void LAYER_WIDGET::insertLayerRow( int aRow, const ROW& aSpec ) { wxASSERT( aRow >= 0 && aRow < MAX_LAYER_ROWS ); wxASSERT( aRow >= 0 ); int col; int index = aRow * LYR_COLUMN_COUNT; Loading Loading @@ -440,7 +440,7 @@ void LAYER_WIDGET::insertLayerRow( int aRow, const ROW& aSpec ) void LAYER_WIDGET::insertRenderRow( int aRow, const ROW& aSpec ) { wxASSERT( aRow >= 0 && aRow < MAX_LAYER_ROWS ); wxASSERT( aRow >= 0 ); int col; int index = aRow * RND_COLUMN_COUNT; Loading
pcbnew/layer_widget.h +8 −4 Original line number Diff line number Diff line Loading @@ -62,6 +62,10 @@ * <p> void OnLayerVisible( int aLayer, bool isVisible ); * <p> void OnRenderColorChange( int id, int aColor ); * <p> void OnRenderEnable( int id, bool isEnabled ); * * Please note that even if designed toward layers, it is used to * contain other stuff, too (the second page in pcbnew contains render * items, for example) */ class LAYER_WIDGET : public wxPanel { Loading Loading @@ -133,9 +137,11 @@ protected: /** * Function getDecodedId * decodes \a aControlId to original un-encoded value. * decodes \a aControlId to original un-encoded value. This of * course holds iff encodedId was called with a LAYER_NUM (this box * is used for other things than layers, too) */ static int getDecodedId( int aControlId ); static LAYER_NUM getDecodedId( int aControlId ); /** * Function makeColorButton Loading Loading @@ -243,8 +249,6 @@ public: */ void AppendLayerRow( const ROW& aRow ); #define MAX_LAYER_ROWS 64 ///< cannot append more than this number of rows /** * Function AppendLayerRows * appends new rows in the layer portion of the widget. The user must Loading