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

List:       kde-kimageshop
Subject:    Patch for loading of generator layers
From:       Sven Langkamp <sven.langkamp () gmail ! com>
Date:       2010-04-10 15:48:41
Message-ID: i2k478b087a1004100848p1cc2976dj86b50d7ed5fdaa05 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

I have attached a patch to fix loading of generator layers.
I'm not sure why we are loading the paintdevice in the loading code, since
it's not saved. Is it needed for some case?


Sven

[Attachment #5 (text/html)]

Hi,<br><br>I have attached a patch to fix loading of generator layers.<br>I&#39;m not \
sure why we are loading the paintdevice in the loading code, since it&#39;s not \
saved. Is it needed for some case?<br><br><br>Sven<br>

--001485f897ec9da30c0483e3d89d--


["generator.diff" (text/x-patch)]

Index: image/generator/kis_generator_layer.h
===================================================================
--- image/generator/kis_generator_layer.h	(Revision 1113293)
+++ image/generator/kis_generator_layer.h	(Arbeitskopie)
@@ -70,19 +70,18 @@
     QIcon icon() const;
     KoDocumentSectionModel::PropertyList sectionModelProperties() const;
 
+    /**
+     * re-run the generator. This happens over the bounds
+     * of the associated selection.
+     */
+    void update();
+    
 public slots:
     // KisIndirectPaintingSupport
     KisLayer* layer() {
         return this;
     }
 
-protected:
-    /**
-     * re-run the generator. This happens over the bounds
-     * of the associated selection.
-     */
-    void update();
-
 private:
     class Private;
     Private * const m_d;
Index: ui/kra/kis_kra_load_visitor.cpp
===================================================================
--- ui/kra/kis_kra_load_visitor.cpp	(Revision 1113293)
+++ ui/kra/kis_kra_load_visitor.cpp	(Arbeitskopie)
@@ -183,14 +183,14 @@
 
 bool KisKraLoadVisitor::visit(KisGeneratorLayer* layer)
 {
-    if (!loadPaintDevice(layer->paintDevice(), getLocation(layer))) {
-        return false;
-    }
+//     if (!loadPaintDevice(layer->paintDevice(), getLocation(layer))) {
+//         return false;
+//     }
+// 
+//     if (!loadProfile(layer->paintDevice(), getLocation(layer, DOT_ICC))) {
+//         return false;
+//     }
 
-    if (!loadProfile(layer->paintDevice(), getLocation(layer, DOT_ICC))) {
-        return false;
-    }
-
     if (!loadMetaData(layer)) {
         return false;
     }
@@ -199,6 +199,8 @@
 
     loadFilterConfiguration(layer->generator(), getLocation(layer, DOT_FILTERCONFIG));
 
+    layer->update();
+    
     bool result = visitAll(layer);
 
     layer->setDirty(m_image->bounds());


_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop


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

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