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;