diff options
Diffstat (limited to 'src/gui/base/widget.cpp')
-rw-r--r-- | src/gui/base/widget.cpp | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/src/gui/base/widget.cpp b/src/gui/base/widget.cpp index 6083fb35a..e0f33d498 100644 --- a/src/gui/base/widget.cpp +++ b/src/gui/base/widget.cpp @@ -71,7 +71,6 @@ #include "gui/base/basiccontainer.hpp" #include "events/event.h" -#include "gui/base/exception.hpp" #include "gui/base/focushandler.hpp" #include "gui/base/keyinput.hpp" #include "gui/base/mouseinput.hpp" @@ -276,10 +275,7 @@ namespace gcn void Widget::requestFocus() { if (!mFocusHandler) - { - throw GCN_EXCEPTION("No focushandler set (did you add " - "the widget to the gui?)."); - } + return; if (isFocusable()) mFocusHandler->requestFocus(this); @@ -521,10 +517,7 @@ namespace gcn void Widget::requestModalFocus() { if (!mFocusHandler) - { - throw GCN_EXCEPTION("No focushandler set (did you add " - "the widget to the gui?)."); - } + return; mFocusHandler->requestModalFocus(this); } @@ -532,10 +525,7 @@ namespace gcn void Widget::requestModalMouseInputFocus() { if (!mFocusHandler) - { - throw GCN_EXCEPTION("No focushandler set (did you add " - "the widget to the gui?)."); - } + return; mFocusHandler->requestModalMouseInputFocus(this); } @@ -559,10 +549,7 @@ namespace gcn bool Widget::isModalFocused() const { if (!mFocusHandler) - { - throw GCN_EXCEPTION("No focushandler set (did you add " - "the widget to the gui?)."); - } + return false; if (mParent) { @@ -576,10 +563,7 @@ namespace gcn bool Widget::isModalMouseInputFocused() const { if (!mFocusHandler) - { - throw GCN_EXCEPTION("No focushandler set (did you add " - "the widget to the gui?)."); - } + return false; if (mParent) { |