Get rid of unnecessary helper function in the svg sample
No real changes, just remove the trivial CreateNewPage() function which made the code less clear without any real gain.
This commit is contained in:
parent
3745f2c771
commit
b7822ff511
1 changed files with 1 additions and 9 deletions
|
|
@ -62,8 +62,6 @@ public:
|
|||
MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title,
|
||||
const wxPoint& pos, const wxSize& size);
|
||||
|
||||
MyPage *CreateNewPage(int index);
|
||||
|
||||
void FileSavePicture(wxCommandEvent& event);
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
|
|
@ -148,17 +146,11 @@ MyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title,
|
|||
{
|
||||
wxString svgTitle;
|
||||
svgTitle.Printf(wxT("SVG Test %d"), i);
|
||||
m_notebook->AddPage(CreateNewPage(i), svgTitle);
|
||||
m_notebook->AddPage(new MyPage(m_notebook, i), svgTitle);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
MyPage *MyFrame::CreateNewPage(int index)
|
||||
{
|
||||
MyPage *page = new MyPage(m_notebook, index);
|
||||
return page;
|
||||
}
|
||||
|
||||
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
Close();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue