diff options
author | Eugene Sandulenko | 2009-01-11 00:20:27 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2009-01-11 00:20:27 +0000 |
commit | 83972e2001e0654e057b5a4930cd2cbc05165786 (patch) | |
tree | 1137fef4016651c2ad56aa44024649c80d0a939f /gui/dialog.cpp | |
parent | 326df55debb696f73c33450569af4a6d0c60b0fd (diff) | |
parent | fe39d4f5075cc723945ca813142d02983069d0d5 (diff) | |
download | scummvm-rg350-83972e2001e0654e057b5a4930cd2cbc05165786.tar.gz scummvm-rg350-83972e2001e0654e057b5a4930cd2cbc05165786.tar.bz2 scummvm-rg350-83972e2001e0654e057b5a4930cd2cbc05165786.zip |
Merge in Virtual Keybpard & KeyMapper branch,
- Merge is perfromed in order to not let rotting the code
- Makefile modifications were avoided
Stuff to resolve:
- Circular dependency of common/vkeybd from graphics/
- Make it compilable (?)
- Add some keyboards
- Decide on the key bindings
svn-id: r35813
Diffstat (limited to 'gui/dialog.cpp')
-rw-r--r-- | gui/dialog.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp index d2c4dedb74..bca1be3d0e 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -81,12 +81,12 @@ int Dialog::runModal() { } 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; @@ -343,14 +343,18 @@ void Dialog::removeWidget(Widget *del) { 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; |