r14028 by jghali - #8443: layers are lost when a page is converted to a master page
scribus-commit
scribus-commit at lists.scribus.net
Tue Sep 22 22:50:19 CEST 2009
Revision: 14028
Author: jghali
Date: 2009-09-22T20:47:35.407642Z
Commit message: #8443: layers are lost when a page is converted to a master page
Changeset:
M /branches/Version135/Scribus/scribus/scribusdoc.cpp
Diffs:
Index: scribus/scribusdoc.cpp
===================================================================
--- scribus/scribusdoc.cpp (revision 14027)
+++ scribus/scribusdoc.cpp (revision 14028)
@@ -3446,11 +3446,11 @@
int currActiveLayer = activeLayer();
for (ScLayers::iterator it = Layers.begin(); it != Layers.end(); ++it)
{
- setActiveLayer((*it).LNr);
+ setActiveLayer(it->LNr);
for (uint ite = 0; ite < end2; ++ite)
{
PageItem *itemToCopy = MasterItems.at(ite);
- if ((itemToCopy->OnMasterPage == pageMaster->pageName()) && ((*it).LNr == itemToCopy->LayerNr))
+ if ((itemToCopy->OnMasterPage == pageMaster->pageName()) && (it->LNr == itemToCopy->LayerNr))
tempSelection.addItem(itemToCopy, true);
}
if (tempSelection.count() != 0)
@@ -3475,11 +3475,11 @@
int currActiveLayer = activeLayer();
for (ScLayers::iterator it = Layers.begin(); it != Layers.end(); ++it)
{
- setActiveLayer((*it).LNr);
+ setActiveLayer(it->LNr);
for (uint ite = 0; ite < end; ++ite)
{
PageItem *itemToCopy = DocItems.at(ite);
- if ((itemToCopy->OwnPage == static_cast<int>(sourcePage->pageNr())) && ((*it).LNr == itemToCopy->LayerNr))
+ if ((itemToCopy->OwnPage == static_cast<int>(sourcePage->pageNr())) && (it->LNr == itemToCopy->LayerNr))
tempSelection.addItem(itemToCopy, true);
}
if (tempSelection.count() != 0)
@@ -3488,7 +3488,7 @@
QString dataS = ss->WriteElem(this, view(), &tempSelection);
setMasterPageMode(true);
setCurrentPage(targetPage);
- ss->ReadElem(dataS, prefsData.AvailFonts, this, targetPage->xOffset(), targetPage->yOffset(), false, true, prefsData.GFontSub, view());
+ ss->ReadElemToLayer(dataS, prefsData.AvailFonts, this, targetPage->xOffset(), targetPage->yOffset(), false, true, prefsData.GFontSub, view(), it->LNr);
delete ss;
setMasterPageMode(false);
}
More information about the scribus-commit
mailing list