From cff3bf75a4ae4ede2e9560f50f9a1ef227d495fb Mon Sep 17 00:00:00 2001 From: stephena Date: Mon, 16 Jan 2006 01:56:18 +0000 Subject: [PATCH] Fixed potential crash and drawing error when using the directory browser. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@969 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/src/gui/BrowserDialog.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stella/src/gui/BrowserDialog.cxx b/stella/src/gui/BrowserDialog.cxx index d0864c486..4a07039d9 100644 --- a/stella/src/gui/BrowserDialog.cxx +++ b/stella/src/gui/BrowserDialog.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: BrowserDialog.cxx,v 1.12 2005-09-23 23:35:02 stephena Exp $ +// $Id: BrowserDialog.cxx,v 1.13 2006-01-16 01:56:18 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -149,7 +149,8 @@ void BrowserDialog::updateListing() list.push_back(_nodeContent[i].displayName()); _fileList->setList(list); - _fileList->scrollTo(0); + if(size > 0) + _fileList->setSelected(0); // Finally, redraw setDirty(); draw();