Author: gs
Date: Thu May 15 14:04:53 2008
New Revision: 47574
URL: http://svn.opensuse.org/viewcvs/yast?rev=47574&view=rev
Log:
wHandleInput(): don't throw exceptionm in case of empty tree
Modified:
trunk/ncurses/src/NCTree.cc
Modified: trunk/ncurses/src/NCTree.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/NCTree.cc?rev=47574&r1=47573&r2=47574&view=diff
==============================================================================
--- trunk/ncurses/src/NCTree.cc (original)
+++ trunk/ncurses/src/NCTree.cc Thu May 15 14:04:53 2008
@@ -423,7 +423,7 @@
{
if ( !myPad() )
{
- yuiError() << "PadWidget not valid" << endl;
+ yuiWarning() << "PadWidget not valid" << endl;
return;
}
@@ -443,7 +443,7 @@
NCursesEvent ret = NCursesEvent::none;
YTreeItem * oldCurrentItem = getCurrentItem();
- if ( ! handleInput( key ) )
+ if ( ! handleInput( key ) ) // NCTreePad::handleInput()
{
switch ( key ) {
case KEY_SPACE: // KEY_SPACE is handled in NCTreeLine::handleInput
@@ -457,7 +457,9 @@
}
const YItem * currentItem = getCurrentItem();
- YUI_CHECK_PTR( currentItem );
+ if ( !currentItem )
+ return ret;
+
YTree::selectItem( const_cast