Commit 548645d3 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/monthcal: Don't redraw after MCM_SETCURSEL if selection doesn't change.

parent c01ab160
...@@ -1001,12 +1001,17 @@ MONTHCAL_SetCurSel(MONTHCAL_INFO *infoPtr, SYSTEMTIME *curSel) ...@@ -1001,12 +1001,17 @@ MONTHCAL_SetCurSel(MONTHCAL_INFO *infoPtr, SYSTEMTIME *curSel)
if(!MONTHCAL_ValidateTime(*curSel)) return FALSE; if(!MONTHCAL_ValidateTime(*curSel)) return FALSE;
infoPtr->currentMonth=curSel->wMonth;
infoPtr->currentYear=curSel->wYear;
MONTHCAL_CopyTime(curSel, &infoPtr->minSel); MONTHCAL_CopyTime(curSel, &infoPtr->minSel);
MONTHCAL_CopyTime(curSel, &infoPtr->maxSel); 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); InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
return TRUE; return TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment