X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FpPlotter%2FmBarRange.cxx;h=42db92071198e13c6a40271af51cb959ae9c1972;hb=80b04dc9e3b981e24fe9ae0d81cdeb8af6e6f8c1;hp=8f62478e089105f4a839b4358359454d25d8b302;hpb=25e3adf442d6a8d357d52410267445c54426c525;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mBarRange.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mBarRange.cxx index 8f62478..42db920 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mBarRange.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mBarRange.cxx @@ -70,7 +70,8 @@ END_EVENT_TABLE() //wxDefaultSize mBarRange::mBarRange(wxWindow *parent, int w, int h) -:wxScrolledWindow(parent,-1,wxDefaultPosition, wxSize(60,60) ,wxTAB_TRAVERSAL) +//EED-2019-10-25 :wxScrolledWindow(parent,-1,wxDefaultPosition, wxSize(60,60) ,wxTAB_TRAVERSAL) + :wxPanel(parent,-1,wxDefaultPosition, wxSize(60,60) ,wxTAB_TRAVERSAL) { acceptedClick = true; _bitmap_bar = NULL; @@ -108,6 +109,8 @@ mBarRange::mBarRange(wxWindow *parent, int w, int h) mBarRange::~mBarRange() { + DeletePendingEvents (); + RemoveEventHandler ( GetEventHandler() ); } //--------------------------------------------------------------------------- @@ -119,15 +122,12 @@ void mBarRange::DrawBar() if(_orientation) { SetWindowStyle(wxNO_FULL_REPAINT_ON_RESIZE); - _bitmap_bar = new wxBitmap(_w+1280,_h+100); + _bitmap_bar = new wxBitmap(_w+1280,_h+100); //SIL//_bitmap_info = new wxBitmap(_w+100+1280, _h+100); - } - //vertical - else - { + } else { SetWindowStyle(wxNO_FULL_REPAINT_ON_RESIZE); - _bitmap_bar = new wxBitmap(_h+deviceStart_y+100,_w+1280); - _bitmap_info = new wxBitmap(_h+deviceStart_y+100, _w+1280); + _bitmap_bar = new wxBitmap(_h+deviceStart_y+100,_w+1280); + _bitmap_info = new wxBitmap(_h+deviceStart_y+100, _w+1280); } } //---------------------------------------------------------------------------- @@ -143,7 +143,7 @@ bool mBarRange::GetInRangeProperty() //---------------------------------------------------------------------------- void mBarRange::SetInRangeProperty(bool in) { - _in_rangeProperty=in; + _in_rangeProperty = in; } //---------------------------------------------------------------------------- //the information about the actual triangle in range or not, true if is between start and end @@ -386,7 +386,8 @@ void mBarRange::OnSize( wxSizeEvent &WXUNUSED(event) ) void mBarRange::Refresh(bool eraseBackground, const wxRect* rect) { - wxScrolledWindow::Refresh(false); +//EED2019-10-25 wxScrolledWindow::Refresh(false); + wxPanel::Refresh(false); } @@ -838,9 +839,9 @@ void mBarRange::OnMouseMove(wxMouseEvent& event ) if (barHeight <=_h) { bool in_StartTri = (clickedX>=GetPixelStart()-5+ deviceStart_x) && (clickedX<=GetPixelStart()+5+ deviceStart_x); - bool in_EndTri = (clickedX>=GetPixelEnd()-5+ deviceStart_x) && (clickedX<=GetPixelEnd()+5+ deviceStart_x); - bool in_actualT= withActualDrawed && (clickedX>=GetPixelActual()-5+ deviceStart_x) && (clickedX<=GetPixelActual()+5+ deviceStart_x); - bool in_movingBar = (clickedX>GetPixelStart()+5+ deviceStart_x) && (clickedX=GetPixelEnd()-5+ deviceStart_x) && (clickedX<=GetPixelEnd()+5+ deviceStart_x); + bool in_actualT = withActualDrawed && (clickedX>=GetPixelActual()-5+ deviceStart_x) && (clickedX<=GetPixelActual()+5+ deviceStart_x); + bool in_movingBar= (clickedX>GetPixelStart()+5+ deviceStart_x) && (clickedX=GetPixelStart()-5+ deviceStart_x) && (clickedX<=GetPixelStart()+5+ deviceStart_x); - bool in_EndTri = (clickedX>=GetPixelEnd()-5+ deviceStart_x) && (clickedX<=GetPixelEnd()+5+ deviceStart_x); - bool in_actualT= (clickedX>=GetPixelActual()-5+ deviceStart_x) && (clickedX<=GetPixelActual()+5+ deviceStart_x); - bool in_movingBar = (clickedX>GetPixelStart()+5+ deviceStart_x) && (clickedX=GetPixelStart()-5+ deviceStart_x) && (clickedX<=GetPixelStart()+5+ deviceStart_x); + bool in_EndTri = (clickedX>=GetPixelEnd()-5+ deviceStart_x) && (clickedX<=GetPixelEnd()+5+ deviceStart_x); + bool in_actualT = (clickedX>=GetPixelActual()-5+ deviceStart_x) && (clickedX<=GetPixelActual()+5+ deviceStart_x); + bool in_movingBar = (clickedX>GetPixelStart()+5+ deviceStart_x) && (clickedX