Add menu item to clear log in the grid window
Just make it more convenient to read the logs in it.
This commit is contained in:
@@ -326,6 +326,7 @@ wxBEGIN_EVENT_TABLE( GridFrame, wxFrame )
|
|||||||
EVT_MENU( ID_SET_CELL_BG_COLOUR, GridFrame::SetCellBgColour )
|
EVT_MENU( ID_SET_CELL_BG_COLOUR, GridFrame::SetCellBgColour )
|
||||||
|
|
||||||
EVT_MENU( wxID_ABOUT, GridFrame::OnAbout )
|
EVT_MENU( wxID_ABOUT, GridFrame::OnAbout )
|
||||||
|
EVT_MENU( wxID_CLEAR, GridFrame::OnClear )
|
||||||
EVT_MENU( wxID_EXIT, GridFrame::OnQuit )
|
EVT_MENU( wxID_EXIT, GridFrame::OnQuit )
|
||||||
EVT_MENU( ID_VTABLE, GridFrame::OnVTable)
|
EVT_MENU( ID_VTABLE, GridFrame::OnVTable)
|
||||||
EVT_MENU( ID_BUGS_TABLE, GridFrame::OnBugsTable)
|
EVT_MENU( ID_BUGS_TABLE, GridFrame::OnBugsTable)
|
||||||
@@ -420,6 +421,11 @@ GridFrame::GridFrame()
|
|||||||
fileMenu->Append( wxID_PRINT, "Render" );
|
fileMenu->Append( wxID_PRINT, "Render" );
|
||||||
fileMenu->Append( ID_RENDER_COORDS, "Render G5:P30" );
|
fileMenu->Append( ID_RENDER_COORDS, "Render G5:P30" );
|
||||||
|
|
||||||
|
#if wxUSE_LOG
|
||||||
|
fileMenu->AppendSeparator();
|
||||||
|
fileMenu->Append( wxID_CLEAR, "Clear &log\tCtrl-L" );
|
||||||
|
#endif // wxUSE_LOG
|
||||||
|
|
||||||
fileMenu->AppendSeparator();
|
fileMenu->AppendSeparator();
|
||||||
fileMenu->Append( wxID_EXIT, "E&xit\tAlt-X" );
|
fileMenu->Append( wxID_EXIT, "E&xit\tAlt-X" );
|
||||||
|
|
||||||
@@ -1767,6 +1773,13 @@ void GridFrame::OnAbout( wxCommandEvent& WXUNUSED(ev) )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GridFrame::OnClear( wxCommandEvent& WXUNUSED(ev) )
|
||||||
|
{
|
||||||
|
#if wxUSE_LOG
|
||||||
|
logWin->Clear();
|
||||||
|
#endif // wxUSE_LOG
|
||||||
|
}
|
||||||
|
|
||||||
void GridFrame::OnQuit( wxCommandEvent& WXUNUSED(ev) )
|
void GridFrame::OnQuit( wxCommandEvent& WXUNUSED(ev) )
|
||||||
{
|
{
|
||||||
Close( true );
|
Close( true );
|
||||||
|
@@ -130,6 +130,7 @@ public:
|
|||||||
~GridFrame();
|
~GridFrame();
|
||||||
|
|
||||||
void OnQuit( wxCommandEvent& );
|
void OnQuit( wxCommandEvent& );
|
||||||
|
void OnClear( wxCommandEvent& );
|
||||||
void OnAbout( wxCommandEvent& );
|
void OnAbout( wxCommandEvent& );
|
||||||
void OnVTable( wxCommandEvent& );
|
void OnVTable( wxCommandEvent& );
|
||||||
void OnBugsTable( wxCommandEvent& );
|
void OnBugsTable( wxCommandEvent& );
|
||||||
|
Reference in New Issue
Block a user