summaryrefslogtreecommitdiffabout
path: root/libkdepim/kdateedit.cpp
Side-by-side diff
Diffstat (limited to 'libkdepim/kdateedit.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kdateedit.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/libkdepim/kdateedit.cpp b/libkdepim/kdateedit.cpp
index c4c0081..2c78ea3 100644
--- a/libkdepim/kdateedit.cpp
+++ b/libkdepim/kdateedit.cpp
@@ -423,16 +423,17 @@ void KDateEdit::lineEnterPressed()
if ( withoutDp ) {
KNotifyClient::beep();
} else {
if ( !mDateEdit->text().isEmpty() ) {
mTextChanged = false;
QString text = i18n( "You entered an invalid date!\n Will use current date instead." );
- if ( KMessageBox::warningContinueCancel( 0, text ) == KMessageBox::Continue ) {
- setDate( QDate::currentDate() );
- emit dateChanged( QDate::currentDate() );
- }
+ if ( isVisible() )
+ if ( KMessageBox::warningContinueCancel( 0, text ) == KMessageBox::Continue ) {
+ setDate( QDate::currentDate() );
+ emit dateChanged( QDate::currentDate() );
+ }
}
}
}
}
bool KDateEdit::inputIsValid()