@@ -48,7 +48,7 @@ QgsGeometryValidationDock::QgsGeometryValidationDock( const QString &title, QgsM
48
48
mFeatureRubberband ->setWidth ( scaleFactor );
49
49
mFeatureRubberband ->setStrokeColor ( QColor ( 100 , 255 , 100 , 100 ) );
50
50
51
- mErrorRubberband ->setColor ( QColor ( 180 , 250 , 180 , 100 ) );
51
+ mErrorRubberband ->setColor ( QColor ( " #ffee58ff " ) );
52
52
mErrorRubberband ->setWidth ( scaleFactor );
53
53
54
54
mErrorLocationRubberband ->setIcon ( QgsRubberBand::ICON_X );
@@ -193,22 +193,36 @@ void QgsGeometryValidationDock::showHighlight( const QModelIndex ¤t )
193
193
194
194
mFeatureRubberband ->setToGeometry ( featureGeometry );
195
195
196
-
197
- QPropertyAnimation *animation = new QPropertyAnimation ( mFeatureRubberband , " fillColor" );
198
- animation->setEasingCurve ( QEasingCurve::OutQuad );
199
- connect ( animation, &QPropertyAnimation::finished, animation, &QPropertyAnimation::deleteLater );
200
- connect ( animation, &QPropertyAnimation::valueChanged, this , [this ]
196
+ QPropertyAnimation *featureAnimation = new QPropertyAnimation ( mFeatureRubberband , " fillColor" );
197
+ featureAnimation->setEasingCurve ( QEasingCurve::OutQuad );
198
+ connect ( featureAnimation, &QPropertyAnimation::finished, featureAnimation, &QPropertyAnimation::deleteLater );
199
+ connect ( featureAnimation, &QPropertyAnimation::valueChanged, this , [this ]
201
200
{
202
201
mFeatureRubberband ->update ();
203
202
} );
204
203
205
- animation->setDuration ( 2000 );
206
- animation->setStartValue ( QColor ( 100 , 255 , 100 , 255 ) );
207
- animation->setEndValue ( QColor ( 100 , 255 , 100 , 0 ) );
204
+ featureAnimation->setDuration ( 2000 );
205
+ featureAnimation->setStartValue ( QColor ( 100 , 255 , 100 , 255 ) );
206
+ featureAnimation->setEndValue ( QColor ( 100 , 255 , 100 , 0 ) );
207
+
208
+ featureAnimation->start ();
209
+
210
+ mErrorRubberband ->setToGeometry ( errorGeometry );
211
+
212
+ QPropertyAnimation *errorAnimation = new QPropertyAnimation ( mErrorRubberband , " fillColor" );
213
+ errorAnimation->setEasingCurve ( QEasingCurve::OutQuad );
214
+ connect ( errorAnimation, &QPropertyAnimation::finished, featureAnimation, &QPropertyAnimation::deleteLater );
215
+ connect ( errorAnimation, &QPropertyAnimation::valueChanged, this , [this ]
216
+ {
217
+ mErrorRubberband ->update ();
218
+ } );
219
+
220
+ errorAnimation->setStartValue ( QColor ( " #ffee58ff" ) );
221
+ errorAnimation->setEndValue ( QColor ( " #ffee5800" ) );
208
222
209
- animation->start ();
223
+ errorAnimation->setDuration ( 2000 );
224
+ errorAnimation->start ();
210
225
211
- // mErrorRubberband->setToGeometry( errorGeometry );
212
- mErrorLocationRubberband ->setToGeometry ( QgsGeometry ( new QgsPoint ( locationGeometry ) ) );
226
+ mErrorLocationRubberband ->setToGeometry ( QgsGeometry ( qgis::make_unique<QgsPoint>( locationGeometry ) ) );
213
227
}
214
228
}
0 commit comments