[yast-commit] r56986 - /trunk/ncurses/src/NCtext.cc
Author: gs Date: Mon Apr 27 12:13:26 2009 New Revision: 56986 URL: http://svn.opensuse.org/viewcvs/yast?rev=56986&view=rev Log: Change Lines() to return zero size if the text is emtpy. This fixes bug #289600 (Allow empty labels for InputField etc.) because NCtext::Lines() is used to calculate the default size of those labels. Modified: trunk/ncurses/src/NCtext.cc Modified: trunk/ncurses/src/NCtext.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/NCtext.cc?rev=56986&r1=56985&r2=56986&view=diff ============================================================================== --- trunk/ncurses/src/NCtext.cc (original) +++ trunk/ncurses/src/NCtext.cc Mon Apr 27 12:13:26 2009 @@ -141,7 +141,12 @@ unsigned NCtext::Lines() const { - return mtext.size(); + if ( mtext.size() == 1 && mtext.front().Str() == "" ) + { + return 0; + } + else + return mtext.size(); } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
gs@svn.opensuse.org