diff options
author | Sylvain Joubert <joubert.sy@gmail.com> | 2019-11-18 12:21:08 (GMT) |
---|---|---|
committer | Sylvain Joubert <joubert.sy@gmail.com> | 2019-11-18 16:05:37 (GMT) |
commit | ce99f5ee69a6f8ebbf26d2a82df89b406becaf77 (patch) | |
tree | 554fea766f5f8cf1f54aa887a31d738ef2522347 /Source/CursesDialog | |
parent | f63d84c37c9ee1ea686369848b5bfc22916e1551 (diff) | |
download | CMake-ce99f5ee69a6f8ebbf26d2a82df89b406becaf77.zip CMake-ce99f5ee69a6f8ebbf26d2a82df89b406becaf77.tar.gz CMake-ce99f5ee69a6f8ebbf26d2a82df89b406becaf77.tar.bz2 |
ccmake: Fix rendering on window resize
Repro steps: configure (without errors), the logs are displayed then the
cache is displayed again, resize the window up -> the logs are
redisplayed after resize instead of the cache
The 'CurrentForm' pointer were left pointed to the last log message
form, this resets it to the main form when configure or generate is done
Diffstat (limited to 'Source/CursesDialog')
-rw-r--r-- | Source/CursesDialog/cmCursesMainForm.cxx | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index dff2afe..612b432 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -498,10 +498,6 @@ void cmCursesMainForm::UpdateProgress(const std::string& msg, float prog) int cmCursesMainForm::Configure(int noconfigure) { - int xi; - int yi; - getmaxyx(stdscr, yi, xi); - this->ResetOutputs(); if (noconfigure == 0) { @@ -559,11 +555,13 @@ int cmCursesMainForm::Configure(int noconfigure) if (retVal == -2) { return retVal; } - CurrentForm = this; - this->Render(1, 1, xx, yy); } this->InitializeUI(); + CurrentForm = this; + int xi; + int yi; + getmaxyx(stdscr, yi, xi); this->Render(1, 1, xi, yi); return 0; @@ -571,10 +569,6 @@ int cmCursesMainForm::Configure(int noconfigure) int cmCursesMainForm::Generate() { - int xi; - int yi; - getmaxyx(stdscr, yi, xi); - this->ResetOutputs(); this->UpdateProgress("Generating", 0); @@ -614,11 +608,13 @@ int cmCursesMainForm::Generate() if (retVal == -2) { return retVal; } - CurrentForm = this; - this->Render(1, 1, xx, yy); } this->InitializeUI(); + CurrentForm = this; + int xi; + int yi; + getmaxyx(stdscr, yi, xi); this->Render(1, 1, xi, yi); return 0; |