Rip out rest of macHack architecture.
This commit is contained in:
parent
b70cf1473f
commit
e21fa31f64
|
@ -113,9 +113,6 @@ PAGED_DIALOG::PAGED_DIALOG( wxWindow* aParent, const wxString& aTitle, bool aSho
|
|||
|
||||
void PAGED_DIALOG::finishInitialization()
|
||||
{
|
||||
for( size_t i = 0; i < m_treebook->GetPageCount(); ++i )
|
||||
m_macHack.push_back( true );
|
||||
|
||||
// For some reason adding page labels to the treeCtrl doesn't invalidate its bestSize
|
||||
// cache so we have to do it by hand
|
||||
m_treebook->GetTreeCtrl()->InvalidateBestSize();
|
||||
|
|
|
@ -80,10 +80,7 @@ DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP( SCH_EDIT_FRAME* aFrame ) :
|
|||
m_treebook->AddSubPage( m_textVars, _( "Text Variables" ) );
|
||||
|
||||
for( size_t i = 0; i < m_treebook->GetPageCount(); ++i )
|
||||
{
|
||||
m_treebook->ExpandNode( i );
|
||||
m_macHack.push_back( true );
|
||||
}
|
||||
|
||||
finishDialogSettings();
|
||||
|
||||
|
|
|
@ -53,8 +53,6 @@ protected:
|
|||
PANEL_SETUP_NETCLASSES* m_netclasses;
|
||||
PANEL_TEXT_VARIABLES* m_textVars;
|
||||
std::shared_ptr<ERC_ITEM> m_pinToPinError;
|
||||
|
||||
std::vector<bool> m_macHack;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -71,8 +71,6 @@ private:
|
|||
bool m_dirty;
|
||||
|
||||
wxBoxSizer* m_buttonsSizer;
|
||||
|
||||
std::vector<bool> m_macHack;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -51,8 +51,7 @@ PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
wxSize( 646,361 ), // Default size
|
||||
wxDEFAULT_FRAME_STYLE | wxRESIZE_BORDER | wxFULL_REPAINT_ON_RESIZE | wxTAB_TRAVERSAL,
|
||||
wxT( "pcb_calculator" ) ), // Window name
|
||||
m_lastNotebookPage( -1 ),
|
||||
m_macHack( true )
|
||||
m_lastNotebookPage( -1 )
|
||||
{
|
||||
SHAPE_POLY_SET dummy; // A ugly trick to force the linker to include
|
||||
// some methods in code and avoid link errors
|
||||
|
@ -204,28 +203,7 @@ void PCB_CALCULATOR_FRAME::OnUpdateUI( wxUpdateUIEvent& event )
|
|||
// Until it's shown on screen the above won't work; but doing it anyway at least keeps
|
||||
// putting new OnUpdateUI events into the queue until it *is* shown on screen.
|
||||
if( m_notebook->IsShownOnScreen() )
|
||||
{
|
||||
// Work around an OSX bug where the wxGrid children don't get placed correctly until
|
||||
// the first resize event.
|
||||
#ifdef __WXMAC__
|
||||
if( m_macHack )
|
||||
{
|
||||
wxSize pageSize = elecSpacingPanel->GetSize();
|
||||
|
||||
pageSize.x -= 100;
|
||||
elecSpacingPanel->SetSize( pageSize );
|
||||
elecSpacingPanel->Layout();
|
||||
|
||||
pageSize.x += 100;
|
||||
elecSpacingPanel->SetSize( pageSize );
|
||||
elecSpacingPanel->Layout();
|
||||
|
||||
m_macHack = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
m_lastNotebookPage = m_notebook->GetSelection();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,6 @@ private:
|
|||
wxBoxSizer* m_mainSizer;
|
||||
|
||||
int m_lastNotebookPage;
|
||||
bool m_macHack;
|
||||
|
||||
std::vector<CALCULATOR_PANEL*> m_panels;
|
||||
std::map<std::size_t, CALCULATOR_PANEL*> m_panelTypes;
|
||||
|
|
|
@ -111,12 +111,6 @@ DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP( PCB_EDIT_FRAME* aFrame ) :
|
|||
m_treebook->AddSubPage( m_rules, _( "Custom Rules" ) );
|
||||
m_treebook->AddSubPage( m_severities, _( "Violation Severity" ) );
|
||||
|
||||
for( size_t i = 0; i < m_treebook->GetPageCount(); ++i )
|
||||
{
|
||||
m_treebook->ExpandNode( i );
|
||||
m_macHack.push_back( true );
|
||||
}
|
||||
|
||||
m_treebook->SetMinSize( wxSize( -1, 480 ) );
|
||||
|
||||
finishDialogSettings();
|
||||
|
|
|
@ -64,8 +64,6 @@ protected:
|
|||
PANEL_SETUP_SEVERITIES* m_severities;
|
||||
PANEL_TEXT_VARIABLES* m_textVars;
|
||||
|
||||
std::vector<bool> m_macHack;
|
||||
|
||||
private:
|
||||
int m_currentPage; // the current page index
|
||||
int m_physicalStackupPage; // the page index of the PANEL_SETUP_BOARD_STACKUP page
|
||||
|
|
|
@ -79,9 +79,6 @@ DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES( PCB_EDIT_FRAME* aParen
|
|||
m_posX.SetCoordType( ORIGIN_TRANSFORMS::ABS_X_COORD );
|
||||
m_posY.SetCoordType( ORIGIN_TRANSFORMS::ABS_Y_COORD );
|
||||
|
||||
for( size_t i = 0; i < m_NoteBook->GetPageCount(); ++i )
|
||||
m_macHack.push_back( true );
|
||||
|
||||
m_texts = new FP_TEXT_GRID_TABLE( m_frame );
|
||||
|
||||
m_delayedErrorMessage = wxEmptyString;
|
||||
|
@ -659,19 +656,6 @@ void DIALOG_FOOTPRINT_PROPERTIES::OnPageChange( wxNotebookEvent& aEvent )
|
|||
// Shouldn't be necessary, but is on at least OSX
|
||||
if( page >= 0 )
|
||||
m_NoteBook->ChangeSelection( (unsigned) page );
|
||||
|
||||
#ifdef __WXMAC__
|
||||
// Work around an OSX bug where the wxGrid children don't get placed correctly until
|
||||
// the first resize event
|
||||
if( m_macHack[ page ] )
|
||||
{
|
||||
wxSize pageSize = m_NoteBook->GetPage( page )->GetSize();
|
||||
pageSize.x -= 1;
|
||||
|
||||
m_NoteBook->GetPage( page )->SetSize( pageSize );
|
||||
m_macHack[ page ] = false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -98,7 +98,6 @@ private:
|
|||
int m_delayedFocusColumn;
|
||||
bool m_initialFocus;
|
||||
|
||||
std::vector<bool> m_macHack;
|
||||
enum FP_PROPS_RETVALUE m_returnValue; // the option that closed the dialog
|
||||
|
||||
PANEL_FP_PROPERTIES_3D_MODEL* m_3dPanel;
|
||||
|
|
Loading…
Reference in New Issue