Commit 28901f3b authored by twanvl's avatar twanvl

overload wxEVT_ERASE_BACKGROUND, to reduce flicker

parent f8e38452
......@@ -430,6 +430,7 @@ BEGIN_EVENT_TABLE(ImageSlicePreview, wxControl)
EVT_LEFT_UP (ImageSlicePreview::onLeftUp)
EVT_MOTION (ImageSlicePreview::onMotion)
EVT_MOUSE_CAPTURE_LOST(ImageSlicePreview::onLoseCapture)
EVT_ERASE_BACKGROUND(ImageSlicePreview::onEraseBackground)
END_EVENT_TABLE ()
......@@ -695,4 +696,5 @@ BEGIN_EVENT_TABLE(ImageSliceSelector, wxControl)
EVT_MOTION (ImageSliceSelector::onMotion)
EVT_SIZE (ImageSliceSelector::onSize)
EVT_MOUSE_CAPTURE_LOST(ImageSliceSelector::onLoseCapture)
EVT_ERASE_BACKGROUND(ImageSliceSelector::onEraseBackground)
END_EVENT_TABLE ()
......@@ -142,6 +142,7 @@ class ImageSlicePreview : public wxControl {
void onLoseCapture(wxMouseCaptureLostEvent&);
void onPaint(wxPaintEvent&);
void onEraseBackground(wxEraseEvent&) {}
void draw(DC& dc);
};
......@@ -176,6 +177,7 @@ class ImageSliceSelector : public wxControl {
void onLoseCapture(wxMouseCaptureLostEvent&);
void onPaint(wxPaintEvent&);
void onEraseBackground(wxEraseEvent&) {}
void onSize(wxSizeEvent&);
// Is the mouse on a (scale) handle?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment