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:
Vadim Zeitlin
2020-08-20 17:11:40 +02:00
parent 65c27c6a6e
commit 767f19cf25
2 changed files with 14 additions and 0 deletions

View File

@@ -326,6 +326,7 @@ wxBEGIN_EVENT_TABLE( GridFrame, wxFrame )
EVT_MENU( ID_SET_CELL_BG_COLOUR, GridFrame::SetCellBgColour )
EVT_MENU( wxID_ABOUT, GridFrame::OnAbout )
EVT_MENU( wxID_CLEAR, GridFrame::OnClear )
EVT_MENU( wxID_EXIT, GridFrame::OnQuit )
EVT_MENU( ID_VTABLE, GridFrame::OnVTable)
EVT_MENU( ID_BUGS_TABLE, GridFrame::OnBugsTable)
@@ -420,6 +421,11 @@ GridFrame::GridFrame()
fileMenu->Append( wxID_PRINT, "Render" );
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->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) )
{
Close( true );