mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-27 11:40:07 +00:00
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:
parent
7812952c85
commit
3ae2ae06e8
|
@ -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 )
|
||||
|
|
Loading…
Reference in a new issue