[qet] [4701] Fix user created element crash when parsing label

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 4701
Author:   dfochi
Date:     2016-09-12 19:11:06 +0200 (Mon, 12 Sep 2016)
Log Message:
-----------
Fix user created element crash when parsing label

Modified Paths:
--------------
    trunk/sources/qetgraphicsitem/customelement.cpp

Modified: trunk/sources/qetgraphicsitem/customelement.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/customelement.cpp	2016-09-11 14:56:00 UTC (rev 4700)
+++ trunk/sources/qetgraphicsitem/customelement.cpp	2016-09-12 17:11:06 UTC (rev 4701)
@@ -286,6 +286,13 @@
 			current_location = current_location.parent();
 			dirLevel++;
 		}
+		//User Element without folder treatment
+		if (i == -1) {
+			i = 0;
+			path[i]=current_location.fileName();
+			current_location = current_location.parent();
+			dirLevel = 0;
+		}
 
 		// Only Electric labels created so far
 		//if (current_location.fileName() != "10_electric")


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/