Problems previewing filter which relies on selection

Schleimer, Ben bensch128 at yahoo.com
Fri Feb 2 00:28:03 CET 2007


Hey Boud,
  Here's the patch for fixing the selection. I tried
it with a couple of tools and filters. Hope it doesn't
msmoryleak or anything bad.

Cheers
Ben  


Index:
/home/bensch/work/koffice/krita/core/kis_paint_device.cc
===================================================================
---
/home/bensch/work/koffice/krita/core/kis_paint_device.cc
   (revision 629149)
+++
/home/bensch/work/koffice/krita/core/kis_paint_device.cc
   (working copy)
@@ -300,8 +300,9 @@
         m_x = rhs.m_x;
         m_y = rhs.m_y;
         m_colorSpace = rhs.m_colorSpace;
-        m_hasSelection = false;
-        m_selection = 0;
+        m_hasSelection = rhs.m_hasSelection;
+        if(m_hasSelection) { m_selection = new
KisSelection(*rhs.m_selection); }
+        else { m_selection = NULL; }
         m_pixelSize = rhs.m_pixelSize;
         m_nChannels = rhs.m_nChannels;
         if(rhs.m_exifInfo)
Index:
/home/bensch/work/koffice/krita/ui/kis_previewwidget.cc
===================================================================
---
/home/bensch/work/koffice/krita/ui/kis_previewwidget.cc
    (revision 629149)
+++
/home/bensch/work/koffice/krita/ui/kis_previewwidget.cc
    (working copy)
@@ -49,6 +49,7 @@
 #include <kis_profile.h>
 #include <kis_types.h>
 #include <kis_undo_adapter.h>
+#include <kis_selection.h>
 
 #include "kis_previewwidgetbase.h"
 #include "kis_previewwidget.h"
@@ -199,7 +200,8 @@
     {
         m_previewDevice =
m_origDevice->createThumbnailDevice(w, h); 
     }
-    else {
+    else 
+    {
         m_previewDevice = new KisPaintDevice(
*m_origDevice );
     }







> 
> -- 
> Boudewijn Rempt 
> http://www.valdyas.org/fading/index.cgi
> 



More information about the kimageshop mailing list