Skip to content
Permalink
Browse files

data defined symbol dialog: only remove quoting if there is one (fixes

  • Loading branch information
jef-n committed Apr 19, 2014
1 parent e497a5c commit 4e49ad54cdab9d592eba190e268fcefd0ae628b9
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/gui/symbology-ng/qgsdatadefinedsymboldialog.cpp
@@ -6,7 +6,9 @@
#include <QComboBox>
#include <QPushButton>

QgsDataDefinedSymbolDialog::QgsDataDefinedSymbolDialog( const QList< DataDefinedSymbolEntry >& entries, const QgsVectorLayer* vl, QWidget * parent, Qt::WindowFlags f ): QDialog( parent, f ), mVectorLayer( vl )
QgsDataDefinedSymbolDialog::QgsDataDefinedSymbolDialog( const QList< DataDefinedSymbolEntry >& entries, const QgsVectorLayer* vl, QWidget * parent, Qt::WindowFlags f )
: QDialog( parent, f )
, mVectorLayer( vl )
{
setupUi( this );

@@ -140,6 +142,7 @@ void QgsDataDefinedSymbolDialog::expressionButtonClicked()
{
attributeCombo->setItemText( 0, d.expressionText() );
attributeCombo->setCurrentIndex( 0 );
Q_ASSERT( d.expressionText() == attributeCombo->currentText() );
}
else
{
@@ -156,7 +159,7 @@ int QgsDataDefinedSymbolDialog::comboIndexForExpressionString( const QString& ex
{
QString attributeString = expr.trimmed();
int comboIndex = cb->findText( attributeString );
if ( comboIndex == -1 )
if ( comboIndex == -1 && attributeString.startsWith( '"' ) && attributeString.endsWith( '"') )
{
attributeString.remove( 0, 1 ).chop( 1 );
comboIndex = cb->findText( attributeString );

0 comments on commit 4e49ad5

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