From 3ae2ae06e810f8fdd5a9c08da206fa0579512be2 Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Mon, 28 May 2018 16:01:05 +0200 Subject: [PATCH] Fix recalculating forms twice Summary: 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. Test Plan: The calculate forms test still passes. Reviewers: aacid Subscribers: okular-devel Tags: #okular Differential Revision: https://phabricator.kde.org/D12825 --- core/document.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/core/document.cpp b/core/document.cpp index 2edcc68ec..729a560f2 100644 --- a/core/document.cpp +++ b/core/document.cpp @@ -3948,8 +3948,6 @@ void Document::editFormText( int pageNumber, { QUndoCommand *uc = new EditFormTextCommand( this->d, form, pageNumber, newContents, newCursorPos, form->text(), prevCursorPos, prevAnchorPos ); d->m_undoStack->push( uc ); - - d->recalculateForms(); } void Document::editFormList( int pageNumber, @@ -3959,8 +3957,6 @@ void Document::editFormList( int pageNumber, const QList< int > prevChoices = form->currentChoices(); QUndoCommand *uc = new EditFormListCommand( this->d, form, pageNumber, newChoices, prevChoices ); d->m_undoStack->push( uc ); - - d->recalculateForms(); } void Document::editFormCombo( int pageNumber, @@ -3983,8 +3979,6 @@ void Document::editFormCombo( int pageNumber, QUndoCommand *uc = new EditFormComboCommand( this->d, form, pageNumber, newText, newCursorPos, prevText, prevCursorPos, prevAnchorPos ); d->m_undoStack->push( uc ); - - d->recalculateForms(); } void Document::editFormButtons( int pageNumber, const QList< FormFieldButton* >& formButtons, const QList< bool >& newButtonStates )