From 617168c3b51f36b96874f15c7b43c555758f8d8a Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Thu, 7 Jun 2012 03:30:27 +0200 Subject: [PATCH] CHANGED: #1471 CInterfaceGroup no longer depends on CGroupScrollText. --- code/ryzom/client/src/interface_v3/group_scrolltext.cpp | 3 ++- code/ryzom/client/src/interface_v3/interface_group.cpp | 6 ++---- code/ryzom/client/src/interface_v3/interface_group.h | 2 ++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/group_scrolltext.cpp b/code/ryzom/client/src/interface_v3/group_scrolltext.cpp index f9ddd85fd..2a0885133 100644 --- a/code/ryzom/client/src/interface_v3/group_scrolltext.cpp +++ b/code/ryzom/client/src/interface_v3/group_scrolltext.cpp @@ -43,8 +43,9 @@ CGroupScrollText::CGroupScrollText(const TCtorParam ¶m) : _InvertScrollBar(true), _ListHeight(0), _StartHeight(0), - _EllapsedTime(0) + _EllapsedTime(0) { + _IsGroupScrollText = true; } //======================================================================== diff --git a/code/ryzom/client/src/interface_v3/interface_group.cpp b/code/ryzom/client/src/interface_v3/interface_group.cpp index 8050e3872..83cb0ca35 100644 --- a/code/ryzom/client/src/interface_v3/interface_group.cpp +++ b/code/ryzom/client/src/interface_v3/interface_group.cpp @@ -23,10 +23,7 @@ #include "interface_group.h" #include "interface_link.h" #include "widget_manager.h" - #include "ctrl_scroll_base.h" -#include "group_editbox.h" -#include "group_scrolltext.h" #include "lua_ihm_ryzom.h" using namespace std; @@ -57,6 +54,7 @@ CInterfaceGroup::CInterfaceGroup(const TCtorParam ¶m) : CCtrlBase(param) _Priority= WIN_PRIORITY_NORMAL; _UseCursor = true; _IsGroupContainer = false; + _IsGroupScrollText = false; _AHOnActive = NULL; _AHOnDeactive = NULL; _AHOnLeftClick = NULL; @@ -973,7 +971,7 @@ void CInterfaceGroup::evalChildrenBBox(bool resizeFromChildW, bool resizeFromChi // If it is a group, minimize with MaxHReal / MaxWReal const CInterfaceGroup *sonGroup= dynamic_cast(pIE); // \todo yoyo: do not know why but don't work if this==scroll_text - if(sonGroup && !dynamic_cast(this)) + if(sonGroup && !isGroupScrollText()) { sint32 oldSciX= -16384; sint32 oldSciY= -16384; diff --git a/code/ryzom/client/src/interface_v3/interface_group.h b/code/ryzom/client/src/interface_v3/interface_group.h index d2a93f49c..3b3a59e84 100644 --- a/code/ryzom/client/src/interface_v3/interface_group.h +++ b/code/ryzom/client/src/interface_v3/interface_group.h @@ -248,6 +248,7 @@ public: // quick way to know if the group is a CGroupContainer bool isGroupContainer() const { return _IsGroupContainer; } + bool isGroupScrollText() const{ return _IsGroupScrollText; } CInterfaceGroup* getEnclosingContainer(); @@ -345,6 +346,7 @@ protected: bool _Escapable : 1; bool _UseCursor : 1; bool _IsGroupContainer : 1; // faster than a virual call + bool _IsGroupScrollText : 1; bool _NeedFrameUpdatePos : 1; // typically For CGroupInScene sint32 _ResizeFromChildWMargin; sint32 _ResizeFromChildHMargin;