Skip to content

Commit

Permalink
Default to showing calendar popup for date time widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 12, 2017
1 parent 897dc09 commit d901221
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gui/editorwidgets/qgsdatetimeeditconfig.cpp
Expand Up @@ -146,6 +146,6 @@ void QgsDateTimeEditConfig::setConfig( const QVariantMap &config )
mDisplayFormatComboBox->setCurrentIndex( 1 );
}

mCalendarPopupCheckBox->setChecked( config.value( QStringLiteral( "calendar_popup" ), false ).toBool() );
mCalendarPopupCheckBox->setChecked( config.value( QStringLiteral( "calendar_popup" ), true ).toBool() );
mAllowNullCheckBox->setChecked( config.value( QStringLiteral( "allow_null" ), true ).toBool() );
}
2 changes: 1 addition & 1 deletion src/gui/editorwidgets/qgsdatetimeeditwrapper.cpp
Expand Up @@ -66,7 +66,7 @@ void QgsDateTimeEditWrapper::initWidget( QWidget *editor )
const QString displayFormat = config( QStringLiteral( "display_format" ), QgsDateTimeFieldFormatter::defaultFormat( field().type() ) ).toString();
mQDateTimeEdit->setDisplayFormat( displayFormat );

const bool calendar = config( QStringLiteral( "calendar_popup" ), false ).toBool();
const bool calendar = config( QStringLiteral( "calendar_popup" ), true ).toBool();
mQDateTimeEdit->setCalendarPopup( calendar );
if ( calendar && mQDateTimeEdit->calendarWidget() )
{
Expand Down

0 comments on commit d901221

Please sign in to comment.