Mantis Issue Tracking for Scribus
· Hosting provided by Anduin.net / Øverby Consulting ·

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009890ScribusUndo/Redopublic11-Mar-28 15:5914-Jul-03 21:41
Reportercezaryece 
Assigned Tojghali 
PrioritynormalSeveritytweakReproducibilityhave not tried
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version1.4.0svn 
Target Version1.5.1Fixed in Version 
Summary0009890: [FIX] text undo/redo ver. 2
DescriptionI know that is no time to verify and commit it in 1.4.0, but maybe I am wrong.
At least it can go to 1.4.1

Fix for text undo.
Main changes:
1. detailed created sequence of changes - separately changes of line spacing, separately changes of font color, separately glyph extensions and so on
2. more detailed undo state description

Additionally few small fixes, simplification whole undo processing.
TagsNo tags attached.
Attached Filespatch file icon textUndo_280311.patch [^] (65,562 bytes) 11-Mar-28 15:59 [Show Content]
patch file icon textUndo_310311.patch [^] (83,064 bytes) 11-Mar-31 13:16 [Show Content]
patch file icon textUndo_010411.patch [^] (91,884 bytes) 11-Apr-01 15:41 [Show Content]
patch file icon textUndo_050411.patch [^] (92,127 bytes) 11-Apr-05 09:28 [Show Content]
patch file icon newTextUndo.patch [^] (81,125 bytes) 12-Jan-29 12:59 [Show Content]
patch file icon _newTextUndo_.patch [^] (77,646 bytes) 12-Jan-30 07:37 [Show Content]

- Relationships

-  Notes
(0025973)
cezaryece (developer)
11-Mar-29 07:30
edited on: 11-Mar-29 07:41

New feature in this patch is also undo for set optical margins.

Jghali patches are also in it:
-new paragraph selection routine (text selection is done in getItemTextSaxed with restoration of previous selection)
- hacks for selection PARSEP char and for last story paragraph

Two enum types for place of changes and type of changes are merged in one enum type with change FRAME/PARAMFULL into STORY and PARAMSELL is changed into PARAGRAPH for paragraph based properties and into SELECTION for char based properties - it is first step for moving text undo from Page Item into Story Text.

New enum type is exactlyTextEditAct which enumerate all parameters changing actions and is passed as parameter into updateUndo for selecting undo state detailed description and for condition of new undo state creation.

Undo does not work properly with text without paragraph style - undoing changes in paragraph based properties (align, line spacing) cannot be restored as "no style" paragraph style is not applicable. But I think it is not undo problem - this is problem with whole "no style" concept and IMHO that "style" should disappear from user point.

(0025974)
cezaryece (developer)
11-Mar-29 08:11

BTW this patch perhaps need some translation work. As string is closed in 1.4.0 rc3 this patch is for future release (1.4.1?).
(0025975)
cbradney (administrator)
11-Mar-29 18:10

If jghali approves this for inclusion in 1.4.0, then we can live with the string issue. We will have an RC4.
(0025980)
cezaryece (developer)
11-Mar-30 15:50

Stop! patch need fix, Scribus crash after change of horizontal text scaling.
Working on it.
(0025981)
cezaryece (developer)
11-Mar-30 16:00

in patch is:
@@ -3446,10 +3442,10 @@
        if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
                return;
        if (CurItem->asTextFrame())
- CurItem->itemTextSaxed = CurItem->getItemTextSaxed(doc->appMode == modeEdit? PageItem::SELECTION : PageItem::FRAME);
+ CurItem->itemTextSaxed = CurItem->getItemTextSaxed(doc->appMode == modeEdit? PageItem::SELECTION : PageItem::STORY);
        doc->itemSelection_SetScaleH(qRound(ChScale->value() * 10));
        if (CurItem->asTextFrame())
- CurItem->asTextFrame()->updateUndo(CurItem->HasSel? PageItem::PARAMSEL : PageItem::PARAMFULL);
+ CurItem->asTextFrame()->updateUndo(CurItem->HasSel? PageItem::SELECTION : PageItem::STORY);
 }


SHOULD BE:
@@ -3446,10 +3442,10 @@
        if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
                return;
        if (CurItem->asTextFrame())
- CurItem->itemTextSaxed = CurItem->getItemTextSaxed(doc->appMode == modeEdit? PageItem::SELECTION : PageItem::FRAME);
+ CurItem->itemTextSaxed = CurItem->getItemTextSaxed(doc->appMode == modeEdit? PageItem::SELECTION : PageItem::STORY);
        doc->itemSelection_SetScaleH(qRound(ChScale->value() * 10));
        if (CurItem->asTextFrame())
- CurItem->asTextFrame()->updateUndo(CurItem->HasSel? PageItem::PARAMSEL : PageItem::PARAMFULL);
+ CurItem->asTextFrame()->updateUndo(CurItem->HasSel? PageItem::SELECTION : PageItem::STORY, ETEANewTScale);
 }

change is in last line in second parameter for updateUndo.
(0025987)
cezaryece (developer)
11-Mar-31 13:18
edited on: 11-Mar-31 13:20

New fixed version of undo v. 2 patch.
Bring fixes and new cool undo feature - undo/redo for columns, gaps and text distances.
Hope it will be working well now.

(0025992)
cezaryece (developer)
11-Apr-01 15:41

This is not Prima Aprilis... Another version of undo ver. 2 patch.

Now it brings also undo for first line offset and for changing indents and margins by dragging indicators on ruler.

As usual also some fixes and code cleaning.
Enjoy!
(0026002)
cbradney (administrator)
11-Apr-04 22:39

Cezary, as I noted recently, you *must* have a unique identifier in the texts going into the undo functions, eg setUndoColsGapDist should have something like the image scale code has:
        ss->set("IMAGE_SCALE", "image_scale");
        ss->set("OLD_IMAGEXSCALE", oldLocalScX);
        ss->set("OLD_IMAGEYSCALE", oldLocalScY);
        ss->set("NEW_IMAGEXSCALE", LocalScX);
        ss->set("NEW_IMAGEYSCALE", LocalScY);

Ie, you need to record the action, in this case IMAGE_SCALE along with the values, or the else if (ss->contains("IMAGE_SCALE")) etc code in the ::restore() functions can find any, eg the SCALE_TYPE function could find the other scale stuff it it only searched for OLD_IMAGEXSCALE.
(0026004)
cezaryece (developer)
11-Apr-05 09:27

OK, I fix that in new version of patch.
(0026006)
cbradney (administrator)
11-Apr-05 21:21

Are you online now? IRC?

I dont get why ActionManager is getting this stuff: textEditActionDescriptions ??

IT doesn't seem related to Actions (QActions) that people use to interact with the Scribus GUI.. looks like something more text/undo related??? Or do you see this being accessible via shortcuts or something in the future?
(0026009)
cezaryece (developer)
11-Apr-06 07:16

Simply I dont know when to insert this.
In fact it is not action but undo related. I search place to initialization of this strings once Scribus is open, not for each document opened, like actions, so I place them here, but I agree that maybe it is not good place.
If so where such undo related thing should be defined and initialized?
(0026100)
cbradney (administrator)
11-Apr-16 11:04

Due to time limits, I am setting this to be completed for 1.4.1
(0027441)
cbradney (administrator)
12-Jan-03 20:54

Ping on this.. where did this patch get up to.. does it still apply to 1.4.1.svn ?
(0027591)
cbradney (administrator)
12-Jan-23 22:57

ping....
(0027598)
cezaryece (developer)
12-Jan-26 15:36

I have start working at it...
(0027614)
cezaryece (developer)
12-Jan-29 13:05

OK, now you have uploaded a new patch with enhanced version of text undo.
Patch is for current 1.4.1svn.

In addition I had fix cursor placing after undo/redo for deleting chars by Delete/Backspace keys and rulers update after undo/redo for changing paragraph`s indents.
(0027622)
cezaryece (developer)
12-Jan-30 07:36

Seems I have upload not last version of my patch, sorry.
Last one is better.

- Issue History
Date Modified Username Field Change
11-Mar-28 15:59 cezaryece New Issue
11-Mar-28 15:59 cezaryece File Added: textUndo_280311.patch
11-Mar-28 20:53 cbradney Assigned To => jghali
11-Mar-28 20:53 cbradney Status new => assigned
11-Mar-29 07:30 cezaryece Note Added: 0025973
11-Mar-29 07:41 cezaryece Note Edited: 0025973 View Revisions
11-Mar-29 08:11 cezaryece Note Added: 0025974
11-Mar-29 18:10 cbradney Note Added: 0025975
11-Mar-30 15:50 cezaryece Note Added: 0025980
11-Mar-30 16:00 cezaryece Note Added: 0025981
11-Mar-31 13:16 cezaryece File Added: textUndo_310311.patch
11-Mar-31 13:18 cezaryece Note Added: 0025987
11-Mar-31 13:20 cezaryece Note Edited: 0025987 View Revisions
11-Apr-01 15:41 cezaryece Note Added: 0025992
11-Apr-01 15:41 cezaryece File Added: textUndo_010411.patch
11-Apr-04 22:39 cbradney Note Added: 0026002
11-Apr-05 09:27 cezaryece Note Added: 0026004
11-Apr-05 09:28 cezaryece File Added: textUndo_050411.patch
11-Apr-05 21:21 cbradney Note Added: 0026006
11-Apr-05 23:04 cbradney Target Version => 1.4.0
11-Apr-06 07:16 cezaryece Note Added: 0026009
11-Apr-16 11:03 cbradney Target Version 1.4.0 => 1.4.1
11-Apr-16 11:04 cbradney Note Added: 0026100
12-Jan-03 20:54 cbradney Note Added: 0027441
12-Jan-23 22:57 cbradney Note Added: 0027591
12-Jan-26 15:36 cezaryece Note Added: 0027598
12-Jan-29 12:59 cezaryece File Added: newTextUndo.patch
12-Jan-29 13:05 cezaryece Note Added: 0027614
12-Jan-30 07:36 cezaryece Note Added: 0027622
12-Jan-30 07:37 cezaryece File Added: _newTextUndo_.patch
12-Apr-29 23:14 cbradney Target Version 1.4.1 => 1.4.2
13-Jan-13 22:33 cbradney Target Version 1.4.2 => 1.4.3
13-Jul-04 22:26 cbradney Target Version 1.4.3 => 1.5.0
14-Jul-03 21:41 Kunda Target Version 1.5.0 => 1.5.1



Copyright © 2000 - 2014 MantisBT Team
Powered by Mantis Bugtracker