Mailinglist Archive: yast-commit (723 mails)

< Previous Next >
[yast-commit] r47574 - /trunk/ncurses/src/NCTree.cc
  • From: gs@xxxxxxxxxxxxxxxx
  • Date: Thu, 15 May 2008 12:04:54 -0000
  • Message-id: <20080515120454.3E05636D77@xxxxxxxxxxxxxxxx>
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<YItem *>(currentItem), true );

yuiDebug() << "Old item: " << oldCurrentItem->label() << " Current: " <<
currentItem->label() << endl;

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages