Fix incorrect vertical position of check boxes in some wxGrid on wxWidgets 3.1.4.
Fix also 2 compil warnings. These fixes come from the master branch
This commit is contained in:
parent
ca8f026bc3
commit
89951b01ff
|
@ -102,7 +102,7 @@ DIALOG_FOOTPRINT_BOARD_EDITOR::DIALOG_FOOTPRINT_BOARD_EDITOR( PCB_EDIT_FRAME* aP
|
||||||
wxGridCellAttr* attr = new wxGridCellAttr;
|
wxGridCellAttr* attr = new wxGridCellAttr;
|
||||||
attr->SetRenderer( new wxGridCellBoolRenderer() );
|
attr->SetRenderer( new wxGridCellBoolRenderer() );
|
||||||
attr->SetReadOnly(); // not really; we delegate interactivity to GRID_TRICKS
|
attr->SetReadOnly(); // not really; we delegate interactivity to GRID_TRICKS
|
||||||
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_BOTTOM );
|
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
||||||
m_modelsGrid->SetColAttr( 1, attr );
|
m_modelsGrid->SetColAttr( 1, attr );
|
||||||
m_modelsGrid->SetWindowStyleFlag( m_modelsGrid->GetWindowStyle() & ~wxHSCROLL );
|
m_modelsGrid->SetWindowStyleFlag( m_modelsGrid->GetWindowStyle() & ~wxHSCROLL );
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ DIALOG_FOOTPRINT_FP_EDITOR::DIALOG_FOOTPRINT_FP_EDITOR( FOOTPRINT_EDIT_FRAME* aP
|
||||||
wxGridCellAttr* attr = new wxGridCellAttr;
|
wxGridCellAttr* attr = new wxGridCellAttr;
|
||||||
attr->SetRenderer( new wxGridCellBoolRenderer() );
|
attr->SetRenderer( new wxGridCellBoolRenderer() );
|
||||||
attr->SetReadOnly(); // not really; we delegate interactivity to GRID_TRICKS
|
attr->SetReadOnly(); // not really; we delegate interactivity to GRID_TRICKS
|
||||||
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_BOTTOM );
|
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
||||||
m_modelsGrid->SetColAttr( 1, attr );
|
m_modelsGrid->SetColAttr( 1, attr );
|
||||||
m_modelsGrid->SetWindowStyleFlag( m_modelsGrid->GetWindowStyle() & ~wxHSCROLL );
|
m_modelsGrid->SetWindowStyleFlag( m_modelsGrid->GetWindowStyle() & ~wxHSCROLL );
|
||||||
|
|
||||||
|
|
|
@ -91,8 +91,6 @@ DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG( PCB_BASE_FRAME* aParent, BOARD* aBoard ) :
|
||||||
m_board = aBoard;
|
m_board = aBoard;
|
||||||
m_config = Kiface().KifaceSettings();
|
m_config = Kiface().KifaceSettings();
|
||||||
|
|
||||||
memset( m_boxSelectLayer, 0, sizeof( m_boxSelectLayer ) );
|
|
||||||
|
|
||||||
m_browseButton->SetBitmap( KiBitmap( folder_xpm ) );
|
m_browseButton->SetBitmap( KiBitmap( folder_xpm ) );
|
||||||
|
|
||||||
initDialog();
|
initDialog();
|
||||||
|
|
|
@ -191,7 +191,7 @@ bool DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataToWindow()
|
||||||
#define SET_BOOL_VALUE( aRow, aCol, aValue ) \
|
#define SET_BOOL_VALUE( aRow, aCol, aValue ) \
|
||||||
attr = new wxGridCellAttr; \
|
attr = new wxGridCellAttr; \
|
||||||
attr->SetRenderer( new wxGridCellBoolRenderer() ); \
|
attr->SetRenderer( new wxGridCellBoolRenderer() ); \
|
||||||
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_BOTTOM ); \
|
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); \
|
||||||
attr->SetReadOnly(); \
|
attr->SetReadOnly(); \
|
||||||
m_grid->SetAttr( aRow, aCol, attr ); \
|
m_grid->SetAttr( aRow, aCol, attr ); \
|
||||||
m_grid->SetCellValue( aRow, aCol, ( aValue ) ? "1" : "" )
|
m_grid->SetCellValue( aRow, aCol, ( aValue ) ? "1" : "" )
|
||||||
|
|
|
@ -113,7 +113,7 @@ bool PANEL_MODEDIT_DEFAULTS::TransferDataToWindow()
|
||||||
auto attr = new wxGridCellAttr;
|
auto attr = new wxGridCellAttr;
|
||||||
attr->SetRenderer( new wxGridCellBoolRenderer() );
|
attr->SetRenderer( new wxGridCellBoolRenderer() );
|
||||||
attr->SetReadOnly(); // not really; we delegate interactivity to GRID_TRICKS
|
attr->SetReadOnly(); // not really; we delegate interactivity to GRID_TRICKS
|
||||||
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_BOTTOM );
|
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
||||||
m_grid->SetAttr( i, COL_TEXT_ITALIC, attr );
|
m_grid->SetAttr( i, COL_TEXT_ITALIC, attr );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,13 +115,13 @@ bool PANEL_SETUP_TEXT_AND_GRAPHICS::TransferDataToWindow()
|
||||||
auto attr = new wxGridCellAttr;
|
auto attr = new wxGridCellAttr;
|
||||||
attr->SetRenderer( new wxGridCellBoolRenderer() );
|
attr->SetRenderer( new wxGridCellBoolRenderer() );
|
||||||
attr->SetReadOnly(); // not really; we delegate interactivity to GRID_TRICKS
|
attr->SetReadOnly(); // not really; we delegate interactivity to GRID_TRICKS
|
||||||
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_BOTTOM );
|
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
||||||
m_grid->SetAttr( i, COL_TEXT_ITALIC, attr );
|
m_grid->SetAttr( i, COL_TEXT_ITALIC, attr );
|
||||||
|
|
||||||
attr = new wxGridCellAttr;
|
attr = new wxGridCellAttr;
|
||||||
attr->SetRenderer( new wxGridCellBoolRenderer() );
|
attr->SetRenderer( new wxGridCellBoolRenderer() );
|
||||||
attr->SetReadOnly(); // not really; we delegate interactivity to GRID_TRICKS
|
attr->SetReadOnly(); // not really; we delegate interactivity to GRID_TRICKS
|
||||||
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_BOTTOM );
|
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
||||||
m_grid->SetAttr( i, COL_TEXT_UPRIGHT, attr );
|
m_grid->SetAttr( i, COL_TEXT_UPRIGHT, attr );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -889,7 +889,8 @@ void DisposeOutPts( OutPt*& pp )
|
||||||
|
|
||||||
inline void InitEdge( TEdge* e, TEdge* eNext, TEdge* ePrev, const IntPoint& Pt )
|
inline void InitEdge( TEdge* e, TEdge* eNext, TEdge* ePrev, const IntPoint& Pt )
|
||||||
{
|
{
|
||||||
std::memset( e, 0, sizeof(TEdge) );
|
// This clears the C++ way
|
||||||
|
*e = TEdge( { 0 } );
|
||||||
|
|
||||||
e->Next = eNext;
|
e->Next = eNext;
|
||||||
e->Prev = ePrev;
|
e->Prev = ePrev;
|
||||||
|
|
Loading…
Reference in New Issue