if the first section was a section group, following section groups didn't behave correctly
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3900 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
10330d6061
commit
282cd1ef72
4 changed files with 14 additions and 8 deletions
|
@ -1302,7 +1302,7 @@ static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
|
|||
|
||||
if (uMsg == WM_IN_UPDATEMSG)
|
||||
{
|
||||
RefreshSectionGroups(0);
|
||||
RefreshSectionGroups();
|
||||
|
||||
#if defined(NSIS_SUPPORT_CODECALLBACKS) && defined(NSIS_CONFIG_COMPONENTPAGE)
|
||||
if (wParam)
|
||||
|
@ -1347,7 +1347,7 @@ static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
|
|||
} // end of typecheckshit
|
||||
}
|
||||
|
||||
RefreshSectionGroups(0);
|
||||
RefreshSectionGroups();
|
||||
RefreshComponents(hwndTree1, hTreeItems);
|
||||
|
||||
if (LANG_STR_TAB(LANG_SPACE_REQ)) {
|
||||
|
|
|
@ -34,7 +34,7 @@ void NSISCALL SectionFlagsChanged(unsigned int index) {
|
|||
}
|
||||
}
|
||||
|
||||
unsigned int NSISCALL RefreshSectionGroups(unsigned int i) {
|
||||
static unsigned int NSISCALL _RefreshSectionGroups(unsigned int i, int first_call) {
|
||||
unsigned int selected = 0;
|
||||
unsigned int not_selected = 0;
|
||||
|
||||
|
@ -43,8 +43,10 @@ unsigned int NSISCALL RefreshSectionGroups(unsigned int i) {
|
|||
unsigned int sec = i;
|
||||
|
||||
if (sections[sec].flags & SF_SECGRP) {
|
||||
sections[sec].flags &= ~(SF_SELECTED | SF_PSELECTED);
|
||||
i++;
|
||||
if (!first_call) {
|
||||
sections[sec].flags &= ~(SF_SELECTED | SF_PSELECTED);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
while (i < (unsigned int) num_sections) {
|
||||
|
@ -52,7 +54,7 @@ unsigned int NSISCALL RefreshSectionGroups(unsigned int i) {
|
|||
int ni = i + 1;
|
||||
|
||||
if (flags & SF_SECGRP) {
|
||||
ni = RefreshSectionGroups(i);
|
||||
ni = _RefreshSectionGroups(i, 0);
|
||||
}
|
||||
|
||||
if (flags & SF_SECGRPEND) {
|
||||
|
@ -84,6 +86,10 @@ unsigned int NSISCALL RefreshSectionGroups(unsigned int i) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void NSISCALL RefreshSectionGroups() {
|
||||
_RefreshSectionGroups(0, 1);
|
||||
}
|
||||
|
||||
void NSISCALL SetInstType(int inst_type) {
|
||||
unsigned int i = 0;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define ___COMPONENTS_H___
|
||||
|
||||
void NSISCALL SectionFlagsChanged(unsigned int index);
|
||||
unsigned int NSISCALL RefreshSectionGroups(unsigned int i);
|
||||
void NSISCALL RefreshSectionGroups();
|
||||
void NSISCALL SetInstType(int inst_type);
|
||||
unsigned int NSISCALL GetInstType(HTREEITEM *items);
|
||||
|
||||
|
|
|
@ -1508,7 +1508,7 @@ static int NSISCALL ExecuteEntry(entry *entry_)
|
|||
if (parm2) // set install type
|
||||
{
|
||||
SetInstType(x);
|
||||
RefreshSectionGroups(0);
|
||||
RefreshSectionGroups();
|
||||
}
|
||||
else // get install type
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue