[Scummvm-cvs-logs] SF.net SVN: scummvm:[33841] scummvm/branches/gsoc2008-vkeybd/gui/dialog.cpp
kenny-d at users.sourceforge.net
kenny-d at users.sourceforge.net
Wed Aug 13 21:16:07 CEST 2008
Revision: 33841
http://scummvm.svn.sourceforge.net/scummvm/?rev=33841&view=rev
Author: kenny-d
Date: 2008-08-13 19:16:04 +0000 (Wed, 13 Aug 2008)
Log Message:
-----------
Bug fix: Widget removal from dialog now handled properly
Modified Paths:
--------------
scummvm/branches/gsoc2008-vkeybd/gui/dialog.cpp
Modified: scummvm/branches/gsoc2008-vkeybd/gui/dialog.cpp
===================================================================
--- scummvm/branches/gsoc2008-vkeybd/gui/dialog.cpp 2008-08-13 19:15:12 UTC (rev 33840)
+++ scummvm/branches/gsoc2008-vkeybd/gui/dialog.cpp 2008-08-13 19:16:04 UTC (rev 33841)
@@ -80,12 +80,12 @@
}
void Dialog::open() {
- Widget *w = _firstWidget;
_result = 0;
_visible = true;
g_gui.openDialog(this);
+ Widget *w = _firstWidget;
// Search for the first objects that wantsFocus() (if any) and give it the focus
while (w && !w->wantsFocus()) {
w = w->_next;
@@ -331,14 +331,18 @@
Widget *w = _firstWidget;
if (del == _firstWidget) {
- _firstWidget = _firstWidget->_next;
+ Widget *del_next = del->_next;
+ del->_next = 0;
+ _firstWidget = del_next;
return;
}
w = _firstWidget;
while (w) {
if (w->_next == del) {
- w->_next = w->_next->_next;
+ Widget *del_next = del->_next;
+ del->_next = 0;
+ w->_next = del_next;
return;
}
w = w->_next;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list