Преглед изворни кода

Tab Page Fix

The tab page, like the window, was also trying to pass events down which probably never would have worked anyway. Unfortunately, once events started bubbling up, it short circuited the process and created an infinite loop. This code fixes it.
Peter Robinson пре 3 година
родитељ
комит
48d5ff3e4c

+ 0 - 36
engine/source/gui/containers/guiTabPageCtrl.cc

@@ -33,46 +33,10 @@ IMPLEMENT_CONOBJECT(GuiTabPageCtrl);
 GuiTabPageCtrl::GuiTabPageCtrl(void)
 {
    mBounds.extent.set(100, 200);
-   //dStrcpy(mText,(UTF8*)"TabPage");
    mActive = true;
    mIsContainer = true;
 }
 
-void GuiTabPageCtrl::initPersistFields()
-{
-   Parent::initPersistFields();
-}
-
-bool GuiTabPageCtrl::onWake()
-{
-   if (! Parent::onWake())
-      return false;
-
-   return true;
-}
-
-void GuiTabPageCtrl::onSleep()
-{
-   Parent::onSleep();
-}
-
-GuiControl* GuiTabPageCtrl::findHitControl(const Point2I &pt, S32 initialLayer)
-{
-   return Parent::findHitControl(pt, initialLayer);
-}
-
-void GuiTabPageCtrl::onTouchDown(const GuiEvent &event)
-{
-   setUpdate();
-   Point2I localPoint = globalToLocalCoord( event.mousePoint );
-
-   GuiControl *ctrl = findHitControl(localPoint);
-   if (ctrl && ctrl != this)
-   {
-      ctrl->onTouchDown(event);
-   }
-}
-
 bool GuiTabPageCtrl::onMouseDownEditor(const GuiEvent &event, Point2I offset )
 {
    // This shouldn't be called if it's not design time, but check just incase

+ 0 - 8
engine/source/gui/containers/guiTabPageCtrl.h

@@ -33,14 +33,6 @@ class GuiTabPageCtrl : public GuiControl
    public:
       GuiTabPageCtrl();
       DECLARE_CONOBJECT(GuiTabPageCtrl);
-      static void initPersistFields();
-
-      bool onWake();    ///< The page awakens (becomes active)!
-      void onSleep();   ///< The page sleeps (zzzzZZ - becomes inactive)
-
-      GuiControl* findHitControl(const Point2I &pt, S32 initialLayer = -1); ///< Find which control is hit by the mouse starting at a specified layer
-
-      void onTouchDown(const GuiEvent &event);  ///< Called when a mouseDown event occurs
       bool onMouseDownEditor(const GuiEvent &event, 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