View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004214 | Scribus | Story Editor / Text Frames | public | 2006-09-03 22:44 | 2009-08-10 22:14 |
Reporter | axelb | Assigned To | jghali | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Linux | OS | Kubuntu dapper | OS Version | 6.06 |
Product Version | 1.3.3 | ||||
Fixed in Version | 1.3.5svn | ||||
Summary | 0004214: Automatic and unrequested vertically offset of text frames | ||||
Description | When I try to save my multipage document with to frames on each, I naturally try to put them properly in place, on every page. But I discovered that my frames are slightly offset *by themselves* when I have shut down the program and opened the same file again. The offset is *not* by the same amount, but seems to follow a patter. This is what I observed in my document on successive pages where I had aligned every frame to Y=40 (X, B and H always have stayed perfectly the same, strange enough): Page New, changed position (chosen on all of them before save was Y=40 mm!) --------------- 28-29 39.982 mm 30-31 39.985 mm 32-33 40.017 mm 34-35 40.014 mm 36-37 40.012 mm 38-39 40.009 mm 40-41 40.006 mm 42-43 40.003 mm 44-45 40.001 mm 46-47 39.998 mm 48-49 39.995 mm 50-51 39.993 mm 52-53 39.990 mm 54-55 39.987 mm Just try it out yourselves :-) | ||||
Steps To Reproduce | 1. Open a new document Insert many frames and try to align them by an exact numer of millimeters 2. An easy way to do this, is to make one object Y=20, X=20, B=20 and H=20 3. Then mark it and choose object - make multiple copies 4. Chose for instance 10 and an offset of 25 in both directions 5. Save and close the file 6. Open the same file 7. Many of the new frames have changed theit position | ||||
Additional Information | I have tried several times to change the the Frames, but they just key changing back, this is annoying :-( | ||||
Tags | No tags attached. | ||||
Patch | |||||
2006-09-03 22:44
|
|
2006-09-03 22:46
|
|
2006-09-03 22:51
|
|
|
See the added test.sla, it showes the slightly offset text frames (before the save they wasn't). |
|
Anyone looking at this might want to look at the offsets in pt (the internal units) as well. |
2006-09-04 21:12
|
|
|
Added a 80 page document, whoever wants can study the different offsets there :-) |
|
Can you retest with 1.3.3.11 or 1.3.3.12svn, please? |
|
Hi, I was having the same problem with latest 1.3.5svn, and looked into a sla file. I don't have a deep understanding of sla file format, but as I can see it is a problem of design. Positions (YPOS) of objects are saved relative to some fixed zero point, so the numbers increase with every page. Every page has its own starting positions (PAGEYPOS). The number of the y-positions inside the GUI is the position relative to the beginning of the page: <displayed position> = YPOS - PAGEYPOS And this is already the problem: small differences of large numbers. A well-known numerical problem. YPOS and PAGEYPOS have a precision of 6. The absolute position of an A4 page 50 is around 43215.1. Let's say, you have an object at 20.000mm on this page: position is 43271.8. <displayed position> = 56.7 Precision is only 3 now, you will have quite random positions! Solution: There is no perfect solution, but increasing the precision of YPOS and PAGEYPOS values would be sufficient, I think. Inside scxmlstreamwriter.h replace void writeAttribute(const QString & name, double value) { QXmlStreamWriter::writeAttribute(name, QString::number(value)); } by void writeAttribute(const QString & name, double value) { QXmlStreamWriter::writeAttribute(name, QString::number(value, 'g', 15)); } to have full precision of double precision numbers. Probably 9 or 10 will suffice for 50 pages, too. Please note, that this will not fix your saved documents, you'll need to do that manually. Reason: The error occurs when saving your file (and only the first 6 digits of the double precision numbers are saved). Georg |
|
I think, that severity should be set to major. Reason: - For many pages (>>1000) scribus cannot be used (objects will move several millimeters when saving and re-loading a project) - The user can never be sure to continue at the same point of his project when saving and re-loading |
|
Still not fixed in svn version 13252. |
2009-03-18 22:03
|
scribus_1.3.5_svn_random_vertical_position.patch (931 bytes)
diff -urN Scribus_original/scribus/scxmlstreamwriter.h Scribus_new/scribus/scxmlstreamwriter.h --- Scribus_original/scribus/scxmlstreamwriter.h 2009-03-18 22:59:51.000000000 +0100 +++ Scribus_new/scribus/scxmlstreamwriter.h 2009-03-18 23:01:49.000000000 +0100 @@ -21,7 +21,7 @@ void writeAttribute(const QString & name, const QString & value) { QXmlStreamWriter::writeAttribute(name, value); } void writeAttribute(const QString & name, int value) { QXmlStreamWriter::writeAttribute(name, QString::number(value)); } void writeAttribute(const QString & name, uint value) { QXmlStreamWriter::writeAttribute(name, QString::number(value)); } - void writeAttribute(const QString & name, double value) { QXmlStreamWriter::writeAttribute(name, QString::number(value)); } + void writeAttribute(const QString & name, double value) { QXmlStreamWriter::writeAttribute(name, QString::number(value, 'g', 15)); } }; #endif |
|
Added a patch to avoid this buggy usage of QString::number(double). |
|
The patch is now applied in svn (was applied in Windows build for quite some time). |
|
Thank you, this issue is solved for svn build now. |
|
Closing then. |
Date Modified | Username | Field | Change |
---|---|---|---|
2006-09-03 22:44 | axelb | New Issue | |
2006-09-03 22:44 | axelb | File Added: widthChangedUnwanted-3998.png | |
2006-09-03 22:46 | axelb | File Added: widthChangedUnwanted-4017.png | |
2006-09-03 22:51 | axelb | File Added: test.sla | |
2006-09-03 22:52 | axelb | Note Added: 0012422 | |
2006-09-04 07:05 |
|
Note Added: 0012425 | |
2006-09-04 21:12 | axelb | File Added: 80-pages-2columns.sla | |
2006-09-04 23:36 | axelb | Note Added: 0012436 | |
2008-02-06 17:22 | christoph_s | Note Added: 0018885 | |
2008-02-06 17:22 | christoph_s | Status | new => feedback |
2009-02-01 13:17 | georg_hennig | Note Added: 0021061 | |
2009-02-01 16:32 | georg_hennig | Note Edited: 0021061 | |
2009-02-02 12:02 | georg_hennig | Note Added: 0021064 | |
2009-03-07 13:18 | georg_hennig | Note Added: 0021262 | |
2009-03-18 22:03 | georg_hennig | File Added: scribus_1.3.5_svn_random_vertical_position.patch | |
2009-03-18 22:04 | georg_hennig | Note Added: 0021357 | |
2009-05-13 20:43 | jghali | Note Added: 0021725 | |
2009-05-13 20:45 | jghali | Relationship added | has duplicate 0008025 |
2009-05-15 12:25 | georg_hennig | Note Added: 0021737 | |
2009-07-22 22:20 | jghali | Note Added: 0022234 | |
2009-07-22 22:20 | jghali | Status | feedback => resolved |
2009-07-22 22:20 | jghali | Fixed in Version | => 1.3.5svn |
2009-07-22 22:20 | jghali | Resolution | open => fixed |
2009-07-22 22:20 | jghali | Assigned To | => jghali |
2009-08-10 22:14 | cbradney | Status | resolved => closed |
2015-09-17 20:08 | Kunda | Category | Story Editor / Text Frames => Story Ed/Txt Frames |
2015-09-17 20:12 | Kunda | Category | Story Ed/Txt Frames => Story Editor / Text Frames |