r21261 by fschmid -

scribus-commit scribus-commit at lists.scribus.net
Sat Apr 30 09:44:01 UTC 2016


Author: fschmid
Date: Sat Apr 30 09:44:01 2016
New Revision: 21261

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21261
Log:
Fixed Bug #13999: [crash] Ghost items on masterpage

Modified:
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21261&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	Sat Apr 30 09:44:01 2016
@@ -3993,6 +3993,8 @@
 					newItem->groupItemList.append(currItem);
 					currItem->Parent = newItem;
 					currItem->LayerID = newItem->LayerID;
+					currItem->OwnPage = newItem->OwnPage;
+					currItem->OnMasterPage = newItem->OnMasterPage;
 				}
 				doc->Items = DItems;
 			}
@@ -5234,7 +5236,21 @@
 	currItem->Cols   = attrs.valueAsInt("COLUMNS", 1);
 	currItem->ColGap = attrs.valueAsDouble("COLGAP", 0.0);
 	if (attrs.valueAsInt("LAYER", 0) != -1)
+	{
 		currItem->LayerID = attrs.valueAsInt("LAYER", 0);
+		uint layerCount = doc->Layers.count();
+		bool found = false;
+		for (uint i = 0; i < layerCount; ++i)
+		{
+			if (doc->Layers[i].ID == currItem->LayerID)
+			{
+				found = true;
+				break;
+			}
+		}
+		if (!found)
+			currItem->LayerID = doc->firstLayerID();
+	}
 	tmp = "";
 	if ((attrs.hasAttribute("NUMDASH")) && (attrs.valueAsInt("NUMDASH", 0) != 0))
 	{




More information about the scribus-commit mailing list