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
This commit is contained in:
Andre Heinecke 2018-05-28 16:01:05 +02:00 committed by Albert Astals Cid
parent 7812952c85
commit 3ae2ae06e8

View file

@ -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 )