[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/karbon/plugins/filtereffects
From:       Jan Hambrecht <jaham () gmx ! net>
Date:       2009-07-19 11:12:08
Message-ID: 1248001928.892828.5303.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 999157 by jaham:

be a little more relaxed when there are less than 2 input images



 M  +5 -3      MergeEffect.cpp  


--- trunk/koffice/karbon/plugins/filtereffects/MergeEffect.cpp #999156:999157
@@ -43,12 +43,14 @@
 
 QImage MergeEffect::processImages(const QList<QImage> &images, const QRect \
&filterRegion, const KoViewConverter &converter) const  {
-    Q_ASSERT(images.count() == 2);
-    
     int imageCount = images.count();
+    if(!imageCount)
+        return QImage();
     
     QImage result = images[0];
-    
+    if (imageCount == 1)
+        return result;
+        
     QPainter p(&result);
     
     for (int i = 1; i < imageCount; ++i) {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic