From 2d96dd639993c85270ed8faf58ba38b2f3e06829 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Mon, 15 Jun 2020 15:03:22 +0200 Subject: [PATCH] Avoid binding loop in date time widget --- src/gui/editorwidgets/qgsdatetimeedit.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/editorwidgets/qgsdatetimeedit.cpp b/src/gui/editorwidgets/qgsdatetimeedit.cpp index 46fc99a4a1e8..3b37fb8b8efd 100644 --- a/src/gui/editorwidgets/qgsdatetimeedit.cpp +++ b/src/gui/editorwidgets/qgsdatetimeedit.cpp @@ -192,8 +192,12 @@ void QgsDateTimeEdit::showEvent( QShowEvent *event ) void QgsDateTimeEdit::changed( const QDateTime &dateTime ) { - mIsEmpty = false; bool isNull = dateTime.isNull(); + + if ( mIsNull == isNull && QgsDateTimeEdit::dateTime() == dateTime ) + return; + + mIsEmpty = false; if ( isNull != mIsNull ) { mIsNull = isNull;