Skip to content
Permalink
Browse files

MapTip: ParagraphSeparator to \n to support multiline expressions

This allows to properly use multiline expressions in the expression builder
when the map tip HTML definition contains newlines (which are formatted as
ParagraphSeparators in QTextCursor)
See http://qt-project.org/doc/qt-4.8/qtextcursor.html#selectedText
  • Loading branch information
m-kuhn committed Dec 2, 2014
1 parent 327f3e9 commit 49c10fc466d17d3d5aa904c099c2d3312755277f
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/app/qgsvectorlayerproperties.cpp
@@ -319,7 +319,7 @@ void QgsVectorLayerProperties::insertExpression()
selText = selText.mid( 2, selText.size() - 4 );

// display the expression builder
QgsExpressionBuilderDialog dlg( layer, selText, this );
QgsExpressionBuilderDialog dlg( layer, selText.replace( QChar::ParagraphSeparator, '\n' ), this );
dlg.setWindowTitle( tr( "Insert expression" ) );
if ( dlg.exec() == QDialog::Accepted )
{

0 comments on commit 49c10fc

Please sign in to comment.
You can’t perform that action at this time.