From 34c7c24e471cee9428c8c7886091e6fd416bb91f Mon Sep 17 00:00:00 2001 From: stephena Date: Wed, 21 Dec 2005 19:31:18 +0000 Subject: [PATCH] Yet more fixes for tab related focusing issues. I think that's the end of it. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@922 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/src/gui/EventMappingWidget.cxx | 12 ++++++++++-- stella/src/gui/ListWidget.cxx | 6 +++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/stella/src/gui/EventMappingWidget.cxx b/stella/src/gui/EventMappingWidget.cxx index e1f631990..ad3a942ed 100644 --- a/stella/src/gui/EventMappingWidget.cxx +++ b/stella/src/gui/EventMappingWidget.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: EventMappingWidget.cxx,v 1.4 2005-12-21 01:50:16 stephena Exp $ +// $Id: EventMappingWidget.cxx,v 1.5 2005-12-21 19:31:18 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -81,7 +81,7 @@ EventMappingWidget::EventMappingWidget(GuiObject* boss, int x, int y, int w, int l.push_back(EventHandler::ourActionList[i].action); myActionsList->setList(l); - myActionSelected = myActionsList->getSelected(); + myActionsList->setSelected(0); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -228,6 +228,14 @@ void EventMappingWidget::handleCommand(CommandSender* sender, int cmd, } break; + case kListItemDoubleClickedCmd: + if(myActionsList->getSelected() >= 0) + { + myActionSelected = myActionsList->getSelected(); + startRemapping(); + } + break; + case kStartMapCmd: startRemapping(); break; diff --git a/stella/src/gui/ListWidget.cxx b/stella/src/gui/ListWidget.cxx index 254a19721..26186b323 100644 --- a/stella/src/gui/ListWidget.cxx +++ b/stella/src/gui/ListWidget.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: ListWidget.cxx,v 1.36 2005-10-09 20:49:57 stephena Exp $ +// $Id: ListWidget.cxx,v 1.37 2005-12-21 19:31:18 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -73,9 +73,9 @@ void ListWidget::setSelected(int item) { assert(item >= -1 && item < (int)_list.size()); - if (isEnabled() && _selectedItem != item) + if(isEnabled()) { - if (_editMode) + if(_editMode) abortEditMode(); _selectedItem = item;