View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0007631 | Scribus | General | public | 2008-11-26 12:39 | 2008-11-30 21:28 |
| Reporter | OssiLehtinen | Assigned To | fschmid | ||
| Priority | normal | Severity | major | Reproducibility | have not tried |
| Status | closed | Resolution | fixed | ||
| Product Version | 1.3.5svn | ||||
| Fixed in Version | 1.3.5svn | ||||
| Summary | 0007631: Object layers info not preserved when copying a page | ||||
| Description | If I copy a page with elements located on different layers, all the elements end up on the Background layer in the copy. This complicates work substantially. | ||||
| Steps To Reproduce | 1. Create an empty document 2. Create a new layer 3. Create a text frame for example on the new layer 4. Copy page 5. Observe the text frame located in the background layer in the copy. | ||||
| Tags | No tags attached. | ||||
| Attached Files | keepLayersOnPageCopy.diff (2,413 bytes)
Index: scribusXml.h
===================================================================
--- scribusXml.h (Revision 12902)
+++ scribusXml.h (Arbeitskopie)
@@ -52,6 +52,7 @@
*/
bool ReadElemHeader(QString file, bool isFile, double *x, double *y, double *w, double *h);
bool ReadElem(QString fileName, SCFonts &avail, ScribusDoc *doc, double Xp, double Yp, bool Fi, bool loc, QMap<QString,QString> &FontSub, ScribusView *view);
+ bool ReadElemToLayer(QString fileName, SCFonts &avail, ScribusDoc *doc, double Xp, double Yp, bool Fi, bool loc, QMap<QString,QString> &FontSub, ScribusView *view, int toLayer);
QString WriteElem(ScribusDoc *doc, ScribusView *view, Selection *selection);
ColorList Farben;
Index: scribusXml.cpp
===================================================================
--- scribusXml.cpp (Revision 12902)
+++ scribusXml.cpp (Arbeitskopie)
@@ -1023,6 +1023,11 @@
bool ScriXmlDoc::ReadElem(QString fileName, SCFonts &avail, ScribusDoc *doc, double Xp, double Yp, bool Fi, bool loc, QMap<QString,QString> &FontSub, ScribusView *view)
{
+ return ReadElemToLayer(fileName,avail,doc,Xp,Yp,Fi,loc,FontSub,view,0);
+}
+
+bool ScriXmlDoc::ReadElemToLayer(QString fileName, SCFonts &avail, ScribusDoc *doc, double Xp, double Yp, bool Fi, bool loc, QMap<QString,QString> &FontSub, ScribusView *view, int toLayer)
+{
QString ff;
struct CopyPasteBuffer OB;
ParagraphStyle vg;
@@ -1265,7 +1270,7 @@
OB.IFont = doc->toolSettings.defFont;
else
OB.IFont = DoFonts[tmf];
- OB.LayerNr = 0;
+ OB.LayerNr = toLayer;
OB.Language = attrAsString(attrs, "LANGUAGE", doc->Language);
tmp = "";
int numGroup = attrAsInt(attrs, "NUMGROUP", 0);
Index: scribusdoc.cpp
===================================================================
--- scribusdoc.cpp (Revision 12902)
+++ scribusdoc.cpp (Arbeitskopie)
@@ -4805,7 +4805,7 @@
if (m_Selection->count() != 0)
{
ScriXmlDoc *ss = new ScriXmlDoc();
- ss->ReadElem(ss->WriteElem(this, view(), m_Selection), prefsData.AvailFonts, this, destination->xOffset(), destination->yOffset(), false, true, prefsData.GFontSub, view());
+ ss->ReadElemToLayer(ss->WriteElem(this, view(), m_Selection), prefsData.AvailFonts, this, destination->xOffset(), destination->yOffset(), false, true, prefsData.GFontSub, view(),(*it).LNr);
m_Selection->clear();
delete ss;
}
| ||||
| Patch | |||||
|
|
I can confirm this. A workaround for now is to save the file and import the page from the saved .sla file. I patched my Scribus version a while ago to keep the layers when duplicating pages (though in a quite dirty way, IIRC). If you build scribus yourself (and I still have that patch; I'm not sure, it's on another computer), I can mail it to you if you're interested. |
|
|
Also, Bug 0005299 is a duplicate of this; marked as "fixed", however. |
|
|
Ah, I tried searching for a duplicate but didn't find that one. Strange though that it's marked fixed. If you can easily locate the patch, I could take a look (ossi.lehtinen(at)gmail.com), but really don't look too hard if you don't find it. My current project is just about finished so this isn't urgent for me right now, so I can happily wait for an official fix to surface. Thanks anyways. |
|
|
I have attached the mentioned patch now. Obviously it is not a patch to be applied identically to the svn code, but 1) it's a workaround for people who build scribus themselves and use the svn version (know what you're doing :-) ) and 2) it clarifies the problem. |
|
|
Are you using the SVN version from today? You have not specified what revision or date is in the about window |
|
|
The SVN version is from 03 November 2008, so it's not absolutely fresh. |
|
|
12902 here: Today's revision. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2008-11-26 12:39 | OssiLehtinen | New Issue | |
| 2008-11-26 13:46 | BAlpha | Note Added: 0020702 | |
| 2008-11-26 13:50 | BAlpha | Note Edited: 0020702 | |
| 2008-11-26 13:52 | BAlpha | Note Added: 0020703 | |
| 2008-11-26 14:01 | OssiLehtinen | Note Added: 0020704 | |
| 2008-11-26 16:04 | BAlpha | Note Added: 0020705 | |
| 2008-11-26 16:04 | BAlpha | File Added: keepLayersOnPageCopy.diff | |
| 2008-11-26 17:22 | cbradney | Note Added: 0020706 | |
| 2008-11-26 17:25 | OssiLehtinen | Note Added: 0020707 | |
| 2008-11-26 17:38 | BAlpha | Note Added: 0020708 | |
| 2008-11-26 20:09 | cbradney | Status | new => assigned |
| 2008-11-26 20:09 | cbradney | Assigned To | => fschmid |
| 2008-11-29 08:23 | fschmid | Status | assigned => resolved |
| 2008-11-29 08:23 | fschmid | Fixed in Version | => 1.3.5svn |
| 2008-11-29 08:23 | fschmid | Resolution | open => fixed |
| 2008-11-30 21:28 | cbradney | Status | resolved => closed |