From 67bfe1259c7a819ef245289ecda935282e31e2f2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 4 Nov 2012 19:08:17 +0300 Subject: Fix crash with empty relations list. Fix http://bugs.evolonline.org/view.php?id=43 --- src/gui/widgets/guitable.cpp | 7 +++++++ src/gui/widgets/guitable.h | 2 ++ 2 files changed, 9 insertions(+) (limited to 'src') diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp index 4e966599e..39f08340d 100644 --- a/src/gui/widgets/guitable.cpp +++ b/src/gui/widgets/guitable.cpp @@ -599,3 +599,10 @@ void GuiTable::_setFocusHandler(gcn::FocusHandler* focusHandler) } } } + +void GuiTable::requestFocus() +{ + if (!mFocusHandler) + return; + gcn::Widget::requestFocus(); +} diff --git a/src/gui/widgets/guitable.h b/src/gui/widgets/guitable.h index 38026d5ab..899379840 100644 --- a/src/gui/widgets/guitable.h +++ b/src/gui/widgets/guitable.h @@ -153,6 +153,8 @@ public: // Constraints inherited from TableModelListener virtual void modelUpdated(bool) override; + void requestFocus(); + protected: /** Frees all action listeners on inner widgets. */ virtual void uninstallActionListeners(); -- cgit v1.2.3-70-g09d2