Skip to content

Commit

Permalink
MapTip: ParagraphSeparator to \n to support multiline expressions
Browse files Browse the repository at this point in the history
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 49c10fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/qgsvectorlayerproperties.cpp
Expand Up @@ -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 )
{
Expand Down

0 comments on commit 49c10fc

Please sign in to comment.