Changeset 1006c4f in confclerk_git for src/gui/daynavigatorwidget.cpp


Ignore:
Timestamp:
09/06/11 21:15:35 (11 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
c0559b6
Parents:
3655d06
Message:

Fixed ticket #26 (empty tabs after some actions).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/daynavigatorwidget.cpp

    r3655d06 r1006c4f  
    4646    mStartDate = aStartDate;
    4747    mEndDate = aEndDate;
    48     mCurDate = aStartDate;
     48    if (!mCurDate.isValid()) mCurDate = mStartDate;
     49    else if (mCurDate < mStartDate) mCurDate = mStartDate;
     50    else if (mCurDate > mEndDate) mCurDate = mEndDate;
    4951
    50     // QRect rect = mFontMetrics->boundingRect(mCurDate.toString("MMM dd yyyy"));
    51 
    52     if(mStartDate==mEndDate) // only one day conference
    53     {
    54         prevDayButton->setDisabled(true);
    55         nextDayButton->setDisabled(true);
    56         emit(dateChanged(mCurDate));
    57     }
    58     else
    59     {
    60         // at least 2-days conference
    61         prevDayButton->setDisabled(true);
    62         nextDayButton->setDisabled(false);
    63         emit(dateChanged(mCurDate));
    64     }
     52    prevDayButton->setDisabled(mCurDate == mStartDate);
     53    nextDayButton->setDisabled(mCurDate == mEndDate);
     54    emit(dateChanged(mCurDate));
    6555}
    6656
Note: See TracChangeset for help on using the changeset viewer.