[calligra] libs/flake/svg: Hide svg shape from docker

Thorsten Zachmann t.zachmann at zagge.de
Tue Mar 6 04:16:04 GMT 2012


Git commit 545050c8a8412063c15cff7e04ceeea42e09f871 by Thorsten Zachmann.
Committed on 06/03/2012 at 05:13.
Pushed by zachmann into branch 'master'.

Hide svg shape from docker

This fixes the bug reported by Mojtaba Shahi Senobari on calligra-devel, that calligra
crashes when trying to move the Embedd... shape from the add shape docker to the canvas.
It is not a crash but an ASSERT that hits and it would not crash in release mode. However
as the shape cannot be dragged to the canvas it should not be added to the docker. Therefore
we hide it now.

Please review so I can backport to 2.4

CCMAIL: calligra-devel at kde.org

M  +3    -0    libs/flake/svg/SvgShapeFactory.cpp

http://commits.kde.org/calligra/545050c8a8412063c15cff7e04ceeea42e09f871

diff --git a/libs/flake/svg/SvgShapeFactory.cpp b/libs/flake/svg/SvgShapeFactory.cpp
index b5a3896..95602c0 100644
--- a/libs/flake/svg/SvgShapeFactory.cpp
+++ b/libs/flake/svg/SvgShapeFactory.cpp
@@ -36,6 +36,9 @@ SvgShapeFactory::SvgShapeFactory()
 {
     setLoadingPriority(10);
     setXmlElementNames(QString(KoXmlNS::draw), QStringList("image"));
+    // hide from add shapes docker as the shape is not able to be dragged onto 
+    // the canvas as createDefaultShape returns 0.
+    setHidden(true);
 }
 
 SvgShapeFactory::~SvgShapeFactory()



More information about the calligra-devel mailing list