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