comctl32/monthcal: Don't redraw after MCM_SETCURSEL if selection doesn't change.
This commit is contained in:
parent
c01ab1608c
commit
548645d360
|
@ -1001,12 +1001,17 @@ MONTHCAL_SetCurSel(MONTHCAL_INFO *infoPtr, SYSTEMTIME *curSel)
|
|||
|
||||
if(!MONTHCAL_ValidateTime(*curSel)) return FALSE;
|
||||
|
||||
infoPtr->currentMonth=curSel->wMonth;
|
||||
infoPtr->currentYear=curSel->wYear;
|
||||
|
||||
MONTHCAL_CopyTime(curSel, &infoPtr->minSel);
|
||||
MONTHCAL_CopyTime(curSel, &infoPtr->maxSel);
|
||||
|
||||
/* exit earlier if selection equals current */
|
||||
if (infoPtr->currentMonth == curSel->wMonth &&
|
||||
infoPtr->currentYear == curSel->wYear &&
|
||||
infoPtr->curSelDay == curSel->wDay) return TRUE;
|
||||
|
||||
infoPtr->currentMonth = curSel->wMonth;
|
||||
infoPtr->currentYear = curSel->wYear;
|
||||
|
||||
InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
|
||||
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in New Issue