Add onShowBlocks() call to TestFrame class.
authorLuc Trudeau <luc.trudeau.1@ens.etsmtl.ca>
Thu, 19 May 2016 18:11:04 +0000 (14:11 -0400)
committerNathan E. Egge <negge@dgql.org>
Thu, 19 May 2016 18:20:45 +0000 (14:20 -0400)
The wxID_SHOW_BLOCKS event previously called onFilter() and has been
 refactored into onShowBlocks() for API consistency.

Signed-off-by: Nathan E. Egge <negge@dgql.org>
examples/analyzer.cc

index e7f2fc1..4b40431 100644 (file)
@@ -453,6 +453,7 @@ public:
   void onZoomIn(wxCommandEvent &event);
   void onZoomOut(wxCommandEvent &event);
   void onActualSize(wxCommandEvent &event);
+  void onShowBlocks(wxCommandEvent &event);
   void onFilter(wxCommandEvent &event);
   void onPaddingChange(wxCommandEvent &event);
   void onBitsChange(wxCommandEvent &event);
@@ -493,7 +494,7 @@ BEGIN_EVENT_TABLE(TestFrame, wxFrame)
   EVT_MENU(wxID_ZOOM_IN, TestFrame::onZoomIn)
   EVT_MENU(wxID_ZOOM_OUT, TestFrame::onZoomOut)
   EVT_MENU(wxID_ACTUAL_SIZE, TestFrame::onActualSize)
-  EVT_MENU(wxID_SHOW_BLOCKS, TestFrame::onFilter)
+  EVT_MENU(wxID_SHOW_BLOCKS, TestFrame::onShowBlock)
   EVT_MENU(wxID_SHOW_SKIP, TestFrame::onFilter)
   EVT_MENU(wxID_SHOW_NOREF, TestFrame::onFilter)
   EVT_MENU(wxID_SHOW_PADDING, TestFrame::onPaddingChange)
@@ -1310,6 +1311,12 @@ bool TestFrame::setZoom(int zoom) {
   return false;
 }
 
+void TestFrame::onShowBlocks(wxCommandEvent &event) {
+  panel->setShowBlocks(event.IsChecked());
+  panel->render();
+  panel->Refresh(false);
+}
+
 void TestFrame::onFilter(wxCommandEvent &WXUNUSED(event)) {
   panel->setShowBlocks(GetMenuBar()->IsChecked(wxID_SHOW_BLOCKS));
   panel->setShowSkip(GetMenuBar()->IsChecked(wxID_SHOW_SKIP));