From 32ea67dfed453f60442bdf3340edcb379ff86932 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 8 Jul 2002 11:55:55 +0000 Subject: got rid of RTTI again (i.e. dynamic_cast) svn-id: r4492 --- gui/dialog.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gui/dialog.cpp') diff --git a/gui/dialog.cpp b/gui/dialog.cpp index 850c490702..682a36fb2c 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -56,9 +56,8 @@ void Dialog::handleKey(char key, int modifiers) Widget *w = _firstWidget; key = toupper(key); while (w) { - ButtonWidget *b = dynamic_cast(w); - if (b && key == toupper(b->_hotkey)) { - b->handleClick(1); + if (w->_type == kButtonWidget && key == toupper(((ButtonWidget *)w)->_hotkey)) { + w->handleClick(1); break; } w = w->_next; -- cgit v1.2.3