Skip to content

Instantly share code, notes, and snippets.

@dakcarto
Created July 5, 2012 19:56
Show Gist options
  • Save dakcarto/3056047 to your computer and use it in GitHub Desktop.
Save dakcarto/3056047 to your computer and use it in GitHub Desktop.
Patch for composer label text edit erratic cursor, should not break ticket #5862 fix.
diff --git a/src/app/composer/qgscomposerlabelwidget.cpp b/src/app/composer/qgscomposerlabelwidget.cpp
index 69a42af..ac25c87 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();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment