[Cmake-commits] CMake branch, next, updated. v2.8.3-1408-g98ef65e
David Cole
david.cole at kitware.com
Wed Jan 19 11:35:12 EST 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 98ef65ef83e9a055f6797e52021174c3aab1fb13 (commit)
via 693c9a623649ef63aa89f81d359ba875667603d8 (commit)
from 7310a262514acd665ed241c9b42725f1613b1897 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=98ef65ef83e9a055f6797e52021174c3aab1fb13
commit 98ef65ef83e9a055f6797e52021174c3aab1fb13
Merge: 7310a26 693c9a6
Author: David Cole <david.cole at kitware.com>
AuthorDate: Wed Jan 19 11:33:20 2011 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Jan 19 11:33:20 2011 -0500
Merge topic 'fix-11668-ccmake-resize-crash' into next
693c9a6 Avoid exceptions when ccmake terminal window is too small (#11668)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=693c9a623649ef63aa89f81d359ba875667603d8
commit 693c9a623649ef63aa89f81d359ba875667603d8
Author: David Cole <david.cole at kitware.com>
AuthorDate: Wed Jan 19 11:11:19 2011 -0500
Commit: David Cole <david.cole at kitware.com>
CommitDate: Wed Jan 19 11:24:36 2011 -0500
Avoid exceptions when ccmake terminal window is too small (#11668)
Thanks to Nicolas Despres for the patch.
diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx
index 7f3e360..c93f353 100644
--- a/Source/CursesDialog/cmCursesMainForm.cxx
+++ b/Source/CursesDialog/cmCursesMainForm.cxx
@@ -334,32 +334,35 @@ void cmCursesMainForm::Render(int left, int top, int width, int height)
}
// Re-adjust the fields according to their place
- bool isNewPage;
- int i=0;
this->NumberOfPages = 1;
- std::vector<cmCursesCacheEntryComposite*>::iterator it;
- for (it = this->Entries->begin(); it != this->Entries->end(); ++it)
+ if (height > 0)
{
- cmCacheManager::CacheIterator mit =
- this->CMakeInstance->GetCacheManager()->GetCacheIterator((*it)->GetValue());
- if (mit.IsAtEnd() ||
- (!this->AdvancedMode && mit.GetPropertyAsBool("ADVANCED")))
+ bool isNewPage;
+ int i=0;
+ std::vector<cmCursesCacheEntryComposite*>::iterator it;
+ for (it = this->Entries->begin(); it != this->Entries->end(); ++it)
{
- continue;
- }
- int row = (i % height) + 1;
- int page = (i / height) + 1;
- isNewPage = ( page > 1 ) && ( row == 1 );
+ cmCacheManager::CacheIterator mit =
+ this->CMakeInstance->GetCacheManager()->GetCacheIterator((*it)->GetValue());
+ if (mit.IsAtEnd() ||
+ (!this->AdvancedMode && mit.GetPropertyAsBool("ADVANCED")))
+ {
+ continue;
+ }
+ int row = (i % height) + 1;
+ int page = (i / height) + 1;
+ isNewPage = ( page > 1 ) && ( row == 1 );
- if (isNewPage)
- {
- this->NumberOfPages++;
+ if (isNewPage)
+ {
+ this->NumberOfPages++;
+ }
+ (*it)->Label->Move(left, top+row-1, isNewPage);
+ (*it)->IsNewLabel->Move(left+32, top+row-1, false);
+ (*it)->Entry->Move(left+33, top+row-1, false);
+ (*it)->Entry->SetPage(this->NumberOfPages);
+ i++;
}
- (*it)->Label->Move(left, top+row-1, isNewPage);
- (*it)->IsNewLabel->Move(left+32, top+row-1, false);
- (*it)->Entry->Move(left+33, top+row-1, false);
- (*it)->Entry->SetPage(this->NumberOfPages);
- i++;
}
// Post the form
-----------------------------------------------------------------------
Summary of changes:
Source/CursesDialog/cmCursesMainForm.cxx | 45 ++++++++++++++++--------------
1 files changed, 24 insertions(+), 21 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list