Fix bug #11669: "[widgGetNumTabMajor] couldn't find tabbed form from id" after completing any research

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5021 4a71c877-e1ca-e34f-864e-861f7616d084
master
Per Inge Mathisen 2008-05-10 16:54:38 +00:00
parent 6085531f3b
commit a5628c83d9
1 changed files with 22 additions and 22 deletions

View File

@ -878,6 +878,8 @@ static void intDoScreenRefresh(void)
}
// set the tabs again
if (widgGetFromID(psWScreen, IDOBJ_TABFORM) != NULL)
{
if (objMajor >= widgGetNumTabMajor(psWScreen, IDOBJ_TABFORM))
{
objMajor = 0; // reset
@ -889,11 +891,11 @@ static void intDoScreenRefresh(void)
objMinor = 0; // reset minor only
debug(LOG_ERROR, "Reset minor tabs since objMinor is too big");
}
if (widgGetFromID(psWScreen, IDOBJ_TABFORM) != NULL)
{
widgSetTabs(psWScreen, IDOBJ_TABFORM, objMajor, objMinor);
}
if (widgGetFromID(psWScreen,IDSTAT_TABFORM) != NULL )
{
if (statMajor >= widgGetNumTabMajor(psWScreen, IDSTAT_TABFORM))
{
statMajor = 0; // reset
@ -905,8 +907,6 @@ static void intDoScreenRefresh(void)
statMinor = 0; // reset minor only
debug(LOG_ERROR, "Reset minor tabs since statMinor is too big");
}
if (widgGetFromID(psWScreen,IDSTAT_TABFORM) != NULL )
{
widgSetTabs(psWScreen, IDSTAT_TABFORM, statMajor, statMinor);
}