Skip to content

Commit

Permalink
fixes for causing a crash with uae4all: No focushandler set (did you …
Browse files Browse the repository at this point in the history
…add the widget to the gui?).

see reference: http://www.raspberrypi.org/forums/viewtopic.php?p=653405#p653405
  • Loading branch information
sphaero committed Jan 18, 2015
1 parent e4f3d49 commit 1a72794
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ namespace gcn
{
if (mFocusHandler == NULL)
{
throw GCN_EXCEPTION("No focushandler set (did you add the widget to the gui?).");
throw GCN_EXCEPTION("No focushandler set (requestFocus: did you add the widget to the gui?).");
}

if (isFocusable())
Expand Down Expand Up @@ -558,7 +558,7 @@ namespace gcn
{
if (mFocusHandler == NULL)
{
throw GCN_EXCEPTION("No focushandler set (did you add the widget to the gui?).");
throw GCN_EXCEPTION("No focushandler set (requestModalFocus: did you add the widget to the gui?).");
}

mFocusHandler->requestModalFocus(this);
Expand All @@ -568,7 +568,7 @@ namespace gcn
{
if (mFocusHandler == NULL)
{
throw GCN_EXCEPTION("No focushandler set (did you add the widget to the gui?).");
throw GCN_EXCEPTION("No focushandler set (requestModalMouseInputFocus: did you add the widget to the gui?).");
}

mFocusHandler->requestModalMouseInputFocus(this);
Expand Down Expand Up @@ -598,7 +598,8 @@ namespace gcn
{
if (mFocusHandler == NULL)
{
throw GCN_EXCEPTION("No focushandler set (did you add the widget to the gui?).");
return false;
//throw GCN_EXCEPTION("No focushandler set (isModalFocused: did you add the widget to the gui?).");
}

if (getParent() != NULL)
Expand All @@ -614,7 +615,8 @@ namespace gcn
{
if (mFocusHandler == NULL)
{
throw GCN_EXCEPTION("No focushandler set (did you add the widget to the gui?).");
return false;
//throw GCN_EXCEPTION("No focushandler set (isModalMouseInputFocused: did you add the widget to the gui?).");
}

if (getParent() != NULL)
Expand Down
4 changes: 4 additions & 0 deletions src/widgets/tabbedarea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,10 @@ namespace gcn

void TabbedArea::logic()
{
for (unsigned int i = 0; i < mTabs.size(); i++)
{
mTabs[i].second->logic();
}
}

void TabbedArea::adjustSize()
Expand Down

0 comments on commit 1a72794

Please sign in to comment.