As a side effect of f0a80a67 a recalculation was triggered
by the notifyFormChanges called in EditFormTextCommand::redo,
which is called for each edit. So calculation was done twice.
Details
Details
- Reviewers
aacid - Commits
- R223:3ae2ae06e810: Fix recalculating forms twice
The calculate forms test still passes.
Diff Detail
Diff Detail
- Repository
- R223 Okular
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
I did not know when adding f0a80a67 that pushing to the undoStack automatically executes the redo function.
Comment Actions
To clarify:
d->m_undoStack->push( uc );
results in:
EditFormTextCommand::redo()
https://cgit.kde.org/okular.git/tree/core/documentcommands.cpp#n513
which calls:
m_docPriv->notifyFormChanges( m_pageNumber );
https://cgit.kde.org/okular.git/tree/core/document.cpp#n3435
That triggers the recalculate. So it is duplicated here.
Comment Actions
Ugh, Sorry for overlooking these.
Yes. They also call notifyFormChanges in their redo.
Comment Actions
I'll upload a new patch. (sorry for delaying my okular work, I'm currently still a bit swamped by the efail hype)