Skip to content

Commit

Permalink
overlay now compatible with swap content
Browse files Browse the repository at this point in the history
  • Loading branch information
dipsywong98 committed Feb 28, 2019
1 parent 1aeb571 commit 975fe3c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions ImpressionistDoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ void ImpressionistDoc::swapContent()
m_ucPainting = m_ucBitmap;
m_ucBitmap = temp;
m_ucOriginal = temp;
memcpy(m_ucBackup, m_ucPainting, m_nWidth*m_nHeight * 3);
m_pUI->m_origView->refresh();
m_pUI->m_paintView->refresh();
}
Expand Down
6 changes: 6 additions & 0 deletions PaintView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,12 @@ void PaintView::draw()


VideoProcessor::continueWriteStream();
glFlush();
if(m_pDoc->m_ucPainting && m_pDoc->m_ucBackup)
{

memcpy(m_pDoc->m_ucPainting, m_pDoc->m_ucBackup, drawWidth*drawHeight * 3);
}
}

void PaintView::prepareAutoFill()
Expand Down

0 comments on commit 975fe3c

Please sign in to comment.