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

Thorsten Zachmann t.zachmann at zagge.de
Wed Mar 7 17:01:35 GMT 2012


Git commit 97f7938bfb8cc1a120ba4b1ff36ae4f10274dcca by Thorsten Zachmann.
Committed on 06/03/2012 at 05:13.
Pushed by zachmann into branch 'calligra/2.4'.

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

Reviewed by: Boud
(cherry picked from commit 545050c8a8412063c15cff7e04ceeea42e09f871)

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

http://commits.kde.org/calligra/97f7938bfb8cc1a120ba4b1ff36ae4f10274dcca

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