Commit 7d947c16 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

propsheet: Do not change idea of size when new pages are added.

parent adc09ad5
...@@ -402,7 +402,7 @@ static void PROPSHEET_CollectSheetInfoW(LPCPROPSHEETHEADERW lppsh, ...@@ -402,7 +402,7 @@ static void PROPSHEET_CollectSheetInfoW(LPCPROPSHEETHEADERW lppsh,
*/ */
static BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp, static BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp,
PropSheetInfo * psInfo, PropSheetInfo * psInfo,
int index) int index, BOOL resize)
{ {
const DLGTEMPLATE* pTemplate; const DLGTEMPLATE* pTemplate;
const WORD* p; const WORD* p;
...@@ -503,11 +503,14 @@ static BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp, ...@@ -503,11 +503,14 @@ static BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp,
} }
/* remember the largest width and height */ /* remember the largest width and height */
if (width > psInfo->width) if (resize)
psInfo->width = width; {
if (width > psInfo->width)
psInfo->width = width;
if (height > psInfo->height) if (height > psInfo->height)
psInfo->height = height; psInfo->height = height;
}
/* menu */ /* menu */
switch ((WORD)*p) switch ((WORD)*p)
...@@ -2284,7 +2287,7 @@ static BOOL PROPSHEET_AddPage(HWND hwndDlg, ...@@ -2284,7 +2287,7 @@ static BOOL PROPSHEET_AddPage(HWND hwndDlg,
return FALSE; return FALSE;
psInfo->proppage = ppi; psInfo->proppage = ppi;
if (!PROPSHEET_CollectPageInfo(ppsp, psInfo, psInfo->nPages)) if (!PROPSHEET_CollectPageInfo(ppsp, psInfo, psInfo->nPages, FALSE))
return FALSE; return FALSE;
psInfo->proppage[psInfo->nPages].hpage = hpage; psInfo->proppage[psInfo->nPages].hpage = hpage;
...@@ -2840,7 +2843,7 @@ INT_PTR WINAPI PropertySheetA(LPCPROPSHEETHEADERA lppsh) ...@@ -2840,7 +2843,7 @@ INT_PTR WINAPI PropertySheetA(LPCPROPSHEETHEADERA lppsh)
} }
if (!PROPSHEET_CollectPageInfo((LPCPROPSHEETPAGEW)psInfo->proppage[n].hpage, if (!PROPSHEET_CollectPageInfo((LPCPROPSHEETPAGEW)psInfo->proppage[n].hpage,
psInfo, n)) psInfo, n, TRUE))
{ {
if (psInfo->usePropPage) if (psInfo->usePropPage)
DestroyPropertySheetPage(psInfo->proppage[n].hpage); DestroyPropertySheetPage(psInfo->proppage[n].hpage);
...@@ -2883,7 +2886,7 @@ INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh) ...@@ -2883,7 +2886,7 @@ INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
} }
if (!PROPSHEET_CollectPageInfo((LPCPROPSHEETPAGEW)psInfo->proppage[n].hpage, if (!PROPSHEET_CollectPageInfo((LPCPROPSHEETPAGEW)psInfo->proppage[n].hpage,
psInfo, n)) psInfo, n, TRUE))
{ {
if (psInfo->usePropPage) if (psInfo->usePropPage)
DestroyPropertySheetPage(psInfo->proppage[n].hpage); DestroyPropertySheetPage(psInfo->proppage[n].hpage);
......
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