X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/adb85931ab5170068d39ad4ef54157d218bbe8f4..2adfb497e666354303ea6bb0e468f1e53811ad55:/contrib/src/plot/plot.cpp?ds=inline diff --git a/contrib/src/plot/plot.cpp b/contrib/src/plot/plot.cpp index 5f46be05e8..0e210f7b2f 100644 --- a/contrib/src/plot/plot.cpp +++ b/contrib/src/plot/plot.cpp @@ -33,6 +33,7 @@ #include "wx/plot/plot.h" #include "wx/bmpbuttn.h" +#include "wx/module.h" #include @@ -53,27 +54,27 @@ // event types //---------------------------------------------------------------------------- -int wxEVT_PLOT_SEL_CHANGING = wxNewId(); -int wxEVT_PLOT_SEL_CHANGED = wxNewId(); -int wxEVT_PLOT_CLICKED = wxNewId(); -int wxEVT_PLOT_DOUBLECLICKED = wxNewId(); -int wxEVT_PLOT_ZOOM_IN = wxNewId(); -int wxEVT_PLOT_ZOOM_OUT = wxNewId(); -int wxEVT_PLOT_VALUE_SEL_CREATING = wxNewId(); -int wxEVT_PLOT_VALUE_SEL_CREATED = wxNewId(); -int wxEVT_PLOT_VALUE_SEL_CHANGING = wxNewId(); -int wxEVT_PLOT_VALUE_SEL_CHANGED = wxNewId(); -int wxEVT_PLOT_AREA_SEL_CREATING = wxNewId(); -int wxEVT_PLOT_AREA_SEL_CREATED = wxNewId(); -int wxEVT_PLOT_AREA_SEL_CHANGING = wxNewId(); -int wxEVT_PLOT_AREA_SEL_CHANGED = wxNewId(); -int wxEVT_PLOT_BEGIN_X_LABEL_EDIT = wxNewId(); -int wxEVT_PLOT_END_X_LABEL_EDIT = wxNewId(); -int wxEVT_PLOT_BEGIN_Y_LABEL_EDIT = wxNewId(); -int wxEVT_PLOT_END_Y_LABEL_EDIT = wxNewId(); -int wxEVT_PLOT_BEGIN_TITLE_EDIT = wxNewId(); -int wxEVT_PLOT_END_TITLE_EDIT = wxNewId(); -int wxEVT_PLOT_AREA_CREATE = wxNewId(); +const int wxEVT_PLOT_SEL_CHANGING = wxNewEventType(); +const int wxEVT_PLOT_SEL_CHANGED = wxNewEventType(); +const int wxEVT_PLOT_CLICKED = wxNewEventType(); +const int wxEVT_PLOT_DOUBLECLICKED = wxNewEventType(); +const int wxEVT_PLOT_ZOOM_IN = wxNewEventType(); +const int wxEVT_PLOT_ZOOM_OUT = wxNewEventType(); +const int wxEVT_PLOT_VALUE_SEL_CREATING = wxNewEventType(); +const int wxEVT_PLOT_VALUE_SEL_CREATED = wxNewEventType(); +const int wxEVT_PLOT_VALUE_SEL_CHANGING = wxNewEventType(); +const int wxEVT_PLOT_VALUE_SEL_CHANGED = wxNewEventType(); +const int wxEVT_PLOT_AREA_SEL_CREATING = wxNewEventType(); +const int wxEVT_PLOT_AREA_SEL_CREATED = wxNewEventType(); +const int wxEVT_PLOT_AREA_SEL_CHANGING = wxNewEventType(); +const int wxEVT_PLOT_AREA_SEL_CHANGED = wxNewEventType(); +const int wxEVT_PLOT_BEGIN_X_LABEL_EDIT = wxNewEventType(); +const int wxEVT_PLOT_END_X_LABEL_EDIT = wxNewEventType(); +const int wxEVT_PLOT_BEGIN_Y_LABEL_EDIT = wxNewEventType(); +const int wxEVT_PLOT_END_Y_LABEL_EDIT = wxNewEventType(); +const int wxEVT_PLOT_BEGIN_TITLE_EDIT = wxNewEventType(); +const int wxEVT_PLOT_END_TITLE_EDIT = wxNewEventType(); +const int wxEVT_PLOT_AREA_CREATE = wxNewEventType(); //---------------------------------------------------------------------------- // accessor functions for the bitmaps (may return NULL, check for it!) @@ -839,6 +840,8 @@ void wxPlotWindow::Delete( wxPlotCurve* curve ) m_area->DeleteCurve( curve ); m_area->Refresh( FALSE ); + + if (curve == m_current) m_current = (wxPlotCurve *) NULL; } wxPlotCurve *wxPlotWindow::GetCurrent()