View Issue Details

IDProjectCategoryView StatusLast Update
0016919ScribusGeneralpublic2023-04-08 07:02
Reporterale Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version1.7.0.svn 
Summary0016919: applying master pages through "apply master page" cannot be undone
Description"page > apply master page" cannot be undone,.
TagsNo tags attached.
PatchNo

Activities

ale

2023-04-01 08:30

manager   ~0050059

please, don't fix this while i'm working on moving the page items on the masterpage change...

jghali

2023-04-01 18:11

administrator   ~0050060

I just did a test, undo/redo seems to work as expected when going through Page > Apply master page...

utnik

2023-04-01 19:02

updater   ~0050061

my test says:
undo works when i apply the master pages by 'page' → 'apply master page'.
but it doesn't work when it was applied by drag-and-drop in the 'arrange pages' window.
(scribus 1.7.0.svn-r25347 on mac os 13.2.1)

jghali

2023-04-01 21:11

administrator   ~0050062

Just did a test in both 1.5.9.svn and trunk with drag-and-drop from "arrange pages" palette and undo also works in that case. Going through 'page' → 'apply master page' or drag-and-drop in the 'arrange pages' window call same function.

ale

2023-04-02 07:42

manager   ~0050063

Last edited: 2023-04-02 07:42

i did some further tests

- create a new master page with different margins than the current one
- apply the master page to the current page
- the margins get changed
- undo
- the margins do not revert to the ones from the original page

but, indeed, the link to the master page gets reset... (and items from the newly created master page are "removed" from the page)

ale

2023-04-02 10:25

manager   ~0050064

btw, since i don't see any undo code in the part of code i'm working on (ScribusMainWindow::ApplyMasterPage()), i guess that if the bug described above indeed exists it can be fixed without producing any merge conflict in my code...

jghali

2023-04-02 22:54

administrator   ~0050066

I found an issue after another tests: undo does not work like it should when a masterpage is applied to several pages at once: several undo steps are necessary to undo changes to all pages instead of one. But to fix this issue, i'll have to modify ScribusMainWindow::ApplyMasterPage().

utnik

2023-04-03 10:13

updater   ~0050068

i retested (with the same configuration) and undo works (with the exception of the margins).
imho the only difference to the test from saturday is a restart of the system.
sorry for the confusion…

ale

2023-04-07 15:47

manager   ~0050103

yes, applying to multiple pages needs a transaction. i'm adding it to my patch (since i also need to take into account.

i had a look at the ScribusDoc::applyMasterPage() and it was not obvious to me, how to add the undo code for the margins: i guess you can already add that and then check if i did the transaction correctly when i submit a patch for ScribusMainWindow::ApplyMasterPage().

ale

2023-04-08 07:02

manager   ~0050104

one further note from my side: undoing the master page should not apply the previous master page margins, but the margins that were actually defined for the specific page.
this behavior is different from what is already done for the guides and generally speaking the link to the current master page.

Issue History

Date Modified Username Field Change
2023-04-01 08:27 ale New Issue
2023-04-01 08:30 ale Note Added: 0050059
2023-04-01 18:11 jghali Note Added: 0050060
2023-04-01 19:02 utnik Note Added: 0050061
2023-04-01 21:11 jghali Note Added: 0050062
2023-04-02 07:42 ale Note Added: 0050063
2023-04-02 07:42 ale Note Edited: 0050063
2023-04-02 10:25 ale Note Added: 0050064
2023-04-02 22:54 jghali Note Added: 0050066
2023-04-03 10:13 utnik Note Added: 0050068
2023-04-07 15:47 ale Note Added: 0050103
2023-04-08 07:02 ale Note Added: 0050104