From e852d04043854fac1533e83297f968b144a509ed Mon Sep 17 00:00:00 2001 From: Kuba Sunderland-Ober Date: Mon, 12 Jun 2023 16:26:27 -0400 Subject: [PATCH] Ensure the bitmap exported to the clipboard is valid. Fixes #14808 https://gitlab.com/kicad/code/kicad/-/issues/14808 --- eeschema/sheet.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eeschema/sheet.cpp b/eeschema/sheet.cpp index e1aed19317..be1a9ba448 100644 --- a/eeschema/sheet.cpp +++ b/eeschema/sheet.cpp @@ -598,6 +598,9 @@ void SCH_EDIT_FRAME::DrawCurrentSheetToClipboard() PrintPage( cfg ); + // Deselect Bitmap from DC before using the bitmap + dc.SelectObject( wxNullBitmap ); + { wxLogNull doNotLog; // disable logging of failed clipboard actions @@ -611,9 +614,6 @@ void SCH_EDIT_FRAME::DrawCurrentSheetToClipboard() } } - // Deselect Bitmap from DC in order to delete the MemoryDC - dc.SelectObject( wxNullBitmap ); - GRForceBlackPen( false ); screen->m_StartVisu = tmp_startvisu;