Merge topic 'fix-11668-ccmake-resize-crash'
693c9a6
Avoid exceptions when ccmake terminal window is too small (#11668)
This commit is contained in:
commit
c9d3b602d0
|
@ -334,9 +334,11 @@ void cmCursesMainForm::Render(int left, int top, int width, int height)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Re-adjust the fields according to their place
|
// Re-adjust the fields according to their place
|
||||||
|
this->NumberOfPages = 1;
|
||||||
|
if (height > 0)
|
||||||
|
{
|
||||||
bool isNewPage;
|
bool isNewPage;
|
||||||
int i=0;
|
int i=0;
|
||||||
this->NumberOfPages = 1;
|
|
||||||
std::vector<cmCursesCacheEntryComposite*>::iterator it;
|
std::vector<cmCursesCacheEntryComposite*>::iterator it;
|
||||||
for (it = this->Entries->begin(); it != this->Entries->end(); ++it)
|
for (it = this->Entries->begin(); it != this->Entries->end(); ++it)
|
||||||
{
|
{
|
||||||
|
@ -361,6 +363,7 @@ void cmCursesMainForm::Render(int left, int top, int width, int height)
|
||||||
(*it)->Entry->SetPage(this->NumberOfPages);
|
(*it)->Entry->SetPage(this->NumberOfPages);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Post the form
|
// Post the form
|
||||||
this->Form = new_form(this->Fields);
|
this->Form = new_form(this->Fields);
|
||||||
|
|
Loading…
Reference in New Issue