From 5f9f76ea82dc2f4366c90498ec2605b6e59e40c5 Mon Sep 17 00:00:00 2001 From: Larry Shaffer Date: Thu, 5 Jul 2012 14:23:05 -0600 Subject: [PATCH] Additional fix for #5862 fix. Editing text for composer label in text edit widget caused label to emit itemChanged(), which caused cyclical update of gui elements and the cursor to jump to end of text edit's text. Tested update of label via Python and #5862 fix still works, i.e. text edit updates as well. --- src/app/composer/qgscomposerlabelwidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/composer/qgscomposerlabelwidget.cpp b/src/app/composer/qgscomposerlabelwidget.cpp index 69a42af63eb..ac25c877f5a 100644 --- a/src/app/composer/qgscomposerlabelwidget.cpp +++ b/src/app/composer/qgscomposerlabelwidget.cpp @@ -42,8 +42,10 @@ void QgsComposerLabelWidget::on_mTextEdit_textChanged() if ( mComposerLabel ) { mComposerLabel->beginCommand( tr( "Label text changed" ), QgsComposerMergeCommand::ComposerLabelSetText ); + mComposerLabel->blockSignals( true ); mComposerLabel->setText( mTextEdit->toPlainText() ); mComposerLabel->update(); + mComposerLabel->blockSignals( false ); mComposerLabel->endCommand(); } }