View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009817 | Scribus | Undo/Redo | public | 2011-03-08 10:32 | 2011-03-10 21:53 |
Reporter | cezaryece | Assigned To | cbradney | ||
Priority | high | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.4.0svn | ||||
Fixed in Version | 1.4.0svn | ||||
Summary | 0009817: [BUG] unwanted undo state is created after selecting image frame with image sclaed to frame size | ||||
Description | This happens after committing changes with undo for scaling changes in image frames. Now if you for the fist time click on image frame with scaling to frame size than new unwanted undo state is created. Problem is in PageItem::changeImageScaleUndoAction() where seems to oldLocalScX is not equal with LocalScX and oldLocalScY is not equal with LocalScY. Differences are very small (like 4.44089e-16) and depends on frame and image. Small but make that "if ((oldLocalScX == LocalScX) && (oldLocalScY == LocalScY))" is not true on first selecting such frame and undo state is created. | ||||
Tags | No tags attached. | ||||
Patch | |||||
|
fix_undo_scale.patch (728 bytes)
Index: Scribus/scribus/pageitem.cpp =================================================================== --- Scribus/scribus/pageitem.cpp (wersja 16429) +++ Scribus/scribus/pageitem.cpp (kopia robocza) @@ -3090,8 +3090,12 @@ void PageItem::changeImageScaleUndoAction() { - if (oldLocalScX == LocalScX && oldLocalScY == LocalScY) + if ((ScCLocale::toDoubleC(ScCLocale::toQStringC(oldLocalScX)) == + ScCLocale::toDoubleC(ScCLocale::toQStringC(LocalScX))) + && (ScCLocale::toDoubleC(ScCLocale::toQStringC(oldLocalScY)) == + ScCLocale::toDoubleC(ScCLocale::toQStringC(LocalScY)))) return; + if (UndoManager::undoEnabled()) { SimpleState *ss = new SimpleState(Um::ImageScale, |
|
Fix is weird but works. Seems in SLA file saved scale values (or dimmensions) are in other precision. |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-03-08 10:32 | cezaryece | New Issue | |
2011-03-08 10:53 | cezaryece | File Added: fix_undo_scale.patch | |
2011-03-08 10:54 | cezaryece | Note Added: 0025764 | |
2011-03-08 11:18 | cbradney | Status | new => resolved |
2011-03-08 11:18 | cbradney | Fixed in Version | => 1.4.0svn |
2011-03-08 11:18 | cbradney | Resolution | open => fixed |
2011-03-08 11:18 | cbradney | Assigned To | => cbradney |
2011-03-10 21:53 | cbradney | Status | resolved => closed |