1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-12 09:04:33 +02:00

HistoryWidget: No longer set the To date when changing From date, no longer allow a To date earlier than From date

This commit is contained in:
Stefan Derkits
2014-05-20 20:05:35 +02:00
parent 70f4ac24c0
commit fc3999d180

View File

@@ -114,10 +114,14 @@ void
HistoryWidget::onDateClicked( const QDate& date )
{
QDateEdit* cw = qobject_cast< QDateEdit* >( sender() );
if ( cw == m_calendarFrom )
if ( cw == m_calendarFrom && date > m_calendarTo->date())
{
m_calendarTo->setDate( date );
}
if ( cw == m_calendarTo && date < m_calendarFrom->date())
{
m_calendarFrom->setDate( date );
}
m_model->setLimit( 0 );
m_model->setDateFrom( m_calendarFrom->date() );