[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdegraphics/kolourpaint/document (silent)
From: Clarence Dang <dang () kde ! org>
Date: 2007-10-21 6:50:16
Message-ID: 1192949416.012140.5572.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 727600 by dang:
SVN_SILENT Replace "REFACTOR" with Q_ASSERT and comment.
M +20 -1 kpDocument_Selection.cpp
--- trunk/KDE/kdegraphics/kolourpaint/document/kpDocument_Selection.cpp #727599:727600
@@ -219,7 +219,26 @@
// Fill opaque bits of the hole in the document
//
- // REFACTOR: this assumes backgroundColor == imageSel->transparency ().transparentColor()
+#if !defined (QT_NO_DEBUG) && !defined (NDEBUG)
+ if (imageSel->transparency ().isTransparent ())
+ {
+ Q_ASSERT (backgroundColor == imageSel->transparency ().transparentColor ());
+ }
+ else
+ {
+ // If this method is begin called by a tool, the assert does not
+ // have to hold since transparentColor() might not be defined in Opaque
+ // Mode.
+ //
+ // If we were called by a tricky sequence of undo/redo commands, the assert
+ // does not have to hold for additional reason, which is that
+ // kpMainWindow::setImageSelectionTransparency() does not have to
+ // set <backgroundColor> in Opaque Mode.
+ //
+ // In practice, it probably does hold but I wouldn't bet on it.
+ }
+#endif
+
const kpImage selTransparentImage = imageSel->transparentImage ();
if (backgroundColor.isOpaque ())
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic