Skip to content

Commit

Permalink
fix: resolve linux drawing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
SSARCandy committed Jul 18, 2020
1 parent f7f998b commit 9145d04
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion include/gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class DrawPane : public wxPanel

private:
std::string mode_;
wxClientDC dc_;
CLD cld_;
cv::Mat dis_;
};
Expand Down
4 changes: 2 additions & 2 deletions src/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ void MyFrame::OnIdle(wxIdleEvent &evt)
DrawPane::DrawPane(wxPanel *parent, cv::Size s)
: cld_(s)
, wxPanel(parent)
, dc_(wxClientDC(this))
{
}

Expand Down Expand Up @@ -457,7 +456,8 @@ void DrawPane::render()
}

wxBitmap bmp(wxImage(dis_.cols, dis_.rows, dis_.data, true));
dc_.DrawBitmap(bmp, 0, 0);
wxClientDC dc(this);
dc.DrawBitmap(bmp, 0, 0);
}

CLD &DrawPane::cld() { return cld_; }
Expand Down

0 comments on commit 9145d04

Please sign in to comment.