mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-13 09:34:53 +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:
@@ -114,10 +114,14 @@ void
|
|||||||
HistoryWidget::onDateClicked( const QDate& date )
|
HistoryWidget::onDateClicked( const QDate& date )
|
||||||
{
|
{
|
||||||
QDateEdit* cw = qobject_cast< QDateEdit* >( sender() );
|
QDateEdit* cw = qobject_cast< QDateEdit* >( sender() );
|
||||||
if ( cw == m_calendarFrom )
|
if ( cw == m_calendarFrom && date > m_calendarTo->date())
|
||||||
{
|
{
|
||||||
m_calendarTo->setDate( date );
|
m_calendarTo->setDate( date );
|
||||||
}
|
}
|
||||||
|
if ( cw == m_calendarTo && date < m_calendarFrom->date())
|
||||||
|
{
|
||||||
|
m_calendarFrom->setDate( date );
|
||||||
|
}
|
||||||
|
|
||||||
m_model->setLimit( 0 );
|
m_model->setLimit( 0 );
|
||||||
m_model->setDateFrom( m_calendarFrom->date() );
|
m_model->setDateFrom( m_calendarFrom->date() );
|
||||||
|
Reference in New Issue
Block a user