diff --git a/ImpressionistDoc.cpp b/ImpressionistDoc.cpp index c4ece37..f159b6c 100644 --- a/ImpressionistDoc.cpp +++ b/ImpressionistDoc.cpp @@ -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(); } diff --git a/PaintView.cpp b/PaintView.cpp index 55ef163..19faf60 100644 --- a/PaintView.cpp +++ b/PaintView.cpp @@ -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()