File tree 1 file changed +14
-8
lines changed
1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -119,27 +119,33 @@ void QgsTextEditWrapper::initWidget( QWidget* editor )
119
119
}
120
120
}
121
121
122
- void QgsTextEditWrapper::setValue ( const QVariant& value )
122
+ void QgsTextEditWrapper::setValue ( const QVariant& val )
123
123
{
124
124
QString v;
125
- if ( value .isNull () )
125
+ if ( val .isNull () )
126
126
{
127
127
if ( !( field ().type () == QVariant::Int || field ().type () == QVariant::Double || field ().type () == QVariant::LongLong || field ().type () == QVariant::Date ) )
128
128
v = QSettings ().value ( " qgis/nullValue" , " NULL" ).toString ();
129
129
}
130
130
else
131
- v = value .toString ();
131
+ v = val .toString ();
132
132
133
133
if ( mTextEdit )
134
134
{
135
- if ( config ( " UseHtml" ).toBool () )
136
- mTextEdit ->setHtml ( v );
137
- else
138
- mTextEdit ->setPlainText ( v );
135
+ if ( val != value () )
136
+ {
137
+ if ( config ( " UseHtml" ).toBool () )
138
+ mTextEdit ->setHtml ( v );
139
+ else
140
+ mTextEdit ->setPlainText ( v );
141
+ }
139
142
}
140
143
141
144
if ( mPlainTextEdit )
142
- mPlainTextEdit ->setPlainText ( v );
145
+ {
146
+ if ( val != value () )
147
+ mPlainTextEdit ->setPlainText ( v );
148
+ }
143
149
144
150
if ( mLineEdit )
145
151
mLineEdit ->setText ( v );
You can’t perform that action at this time.
0 commit comments