We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7f998b commit 9145d04Copy full SHA for 9145d04
include/gui.h
@@ -30,7 +30,6 @@ class DrawPane : public wxPanel
30
31
private:
32
std::string mode_;
33
- wxClientDC dc_;
34
CLD cld_;
35
cv::Mat dis_;
36
};
src/gui.cpp
@@ -429,7 +429,6 @@ void MyFrame::OnIdle(wxIdleEvent &evt)
429
DrawPane::DrawPane(wxPanel *parent, cv::Size s)
430
: cld_(s)
431
, wxPanel(parent)
432
- , dc_(wxClientDC(this))
433
{
434
}
435
@@ -457,7 +456,8 @@ void DrawPane::render()
457
456
458
459
wxBitmap bmp(wxImage(dis_.cols, dis_.rows, dis_.data, true));
460
- dc_.DrawBitmap(bmp, 0, 0);
+ wxClientDC dc(this);
+ dc.DrawBitmap(bmp, 0, 0);
461
462
463
CLD &DrawPane::cld() { return cld_; }
0 commit comments