[commit] r2118 - trunk/GME/Gme

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Mon Dec 10 09:27:20 CST 2012


Author: ksmyth
Date: Mon Dec 10 09:27:20 2012
New Revision: 2118

Log:
GME-339 part 2: need the same fix for non-GdiPlus decorators in the PanningWindow

Modified:
   trunk/GME/Gme/GMEView.cpp

Modified: trunk/GME/Gme/GMEView.cpp
==============================================================================
--- trunk/GME/Gme/GMEView.cpp	Mon Dec 10 09:26:58 2012	(r2117)
+++ trunk/GME/Gme/GMEView.cpp	Mon Dec 10 09:27:20 2012	(r2118)
@@ -758,6 +758,10 @@
 				CGuiConnection* conn = fco->dynamic_cast_CGuiConnection();
 				if (!conn)
 					fco->Draw(pannDC, &gdip);
+				// GME-339: Gdiplus::Graphics may modify pDC (e.g. SetViewportOrgEx) when a new-style decorator runs
+				// a modified pDC makes old-style (i.e. no DrawEx) decorators render incorrectly (e.g. when the scrollbar is scrolled)
+				gdip.~Graphics();
+				::new ((void*)&gdip) Gdiplus::Graphics(pannDC);
 			}
 		}
 	}


More information about the gme-commit mailing list