Skip to content

Commit

Permalink
Buttons Inside TagPages
Browse files Browse the repository at this point in the history
Fixed a bug where buttons (or other controls) inside of a tab page could not be moved around by dragging it because the page would always steal the selection.
  • Loading branch information
greenfire27 committed Dec 20, 2023
1 parent 2845ea7 commit ea83724
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
7 changes: 5 additions & 2 deletions engine/source/gui/containers/guiTabBookCtrl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,11 @@ bool GuiTabBookCtrl::onMouseDownEditor(const GuiEvent &event, const Point2I& off
edit->select( mActivePage );
}

// Return whether we handled this or not.
return handled;
if (!handled)
{
return Parent::onMouseDownEditor(event, offset);
}
return true;

}

Expand Down
14 changes: 0 additions & 14 deletions engine/source/gui/containers/guiTabPageCtrl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,6 @@ GuiTabPageCtrl::GuiTabPageCtrl(void)
mIsContainer = true;
}

bool GuiTabPageCtrl::onMouseDownEditor(const GuiEvent &event, const Point2I& offset )
{
// This shouldn't be called if it's not design time, but check just incase
if ( GuiControl::smDesignTime )
{
GuiEditCtrl* edit = GuiControl::smEditorHandle;
if( edit )
edit->select( this );
}

return Parent::onMouseDownEditor( event, offset );
}


GuiControl *GuiTabPageCtrl::findNextTabable(GuiControl *curResponder, bool firstCall)
{
//set the global if this is the first call (directly from the canvas)
Expand Down
1 change: 0 additions & 1 deletion engine/source/gui/containers/guiTabPageCtrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class GuiTabPageCtrl : public GuiControl
public:
GuiTabPageCtrl();
DECLARE_CONOBJECT(GuiTabPageCtrl);
bool onMouseDownEditor(const GuiEvent &event, const Point2I& offset ); ///< Called when a mouseDown event occurs and the GUI editor is active

S32 getTabIndex(void) { return mTabIndex; } ///< Get the tab index of this control

Expand Down

0 comments on commit ea83724

Please sign in to comment.