Removed unnecessary variable.
authorKeuckdo Bang <keuckdo.bang@samsung.net>
Tue, 24 Sep 2013 01:22:10 +0000 (10:22 +0900)
committerKeuckdo Bang <keuckdo.bang@samsung.net>
Tue, 24 Sep 2013 01:22:10 +0000 (10:22 +0900)
Change-Id: Ieac98cd3cb4479696681452b49bd484a62df2be5

src/ui/FUi_Control.cpp
src/ui/FUi_Window.cpp
src/ui/inc/FUi_Control.h
src/ui/inc/FUi_Window.h

index 98a4bb0..2474f67 100644 (file)
@@ -3882,7 +3882,10 @@ _Control::SetBackgroundColor(const Color& color)
 
 _Control::~_Control(void)
 {
-       __destroying = true;
+       if (!__destroying)
+       {
+               __destroying = true;
+       }
 
        DoBacktrace(__pDeleteBacktrace.get());
 
@@ -4405,6 +4408,18 @@ _Control::DoBacktrace(Tizen::Base::Collection::ArrayListT<void*>* pBacktraceList
        }
 }
 
+void
+_Control::SetDestroying(bool destroying)
+{
+       __destroying = destroying;
+}
+
+bool
+_Control::IsDestroying(void) const
+{
+       return __destroying;
+}
+
 Tizen::Base::String
 _Control::GetDescription(void) const
 {
index 353590c..1bae845 100644 (file)
@@ -78,7 +78,7 @@ CATCH:
 
 _Window::~_Window(void)
 {
-       __destroying = true;
+       SetDestroying(true);
        Close();
        SetOwner(null);
 
@@ -116,7 +116,7 @@ _Window::~_Window(void)
 _IWindowDelegate&
 _Window::GetWindowDelegate(void) const
 {
-       if (__destroying)
+       if (_Control::IsDestroying())
        {
                return const_cast<_Window&>(*this);
        }
@@ -132,7 +132,7 @@ _Window::GetDescription(void) const
        String descriptionTemp(L"");
 
        descriptionTemp.Format(LOG_LEN_MAX, L"_Window: xid(0x%x) owner(0x%x) delegate(0x%x) activated(%d) destroying(%d) displayContext(0x%x)",
-               GetNativeHandle(), __pOwner, __pWindowDelegate, __activated, __destroying, __pDisplayContext);
+               GetNativeHandle(), __pOwner, __pWindowDelegate, __activated, _Control::IsDestroying(), __pDisplayContext);
 
        description.Append(descriptionTemp);
 
@@ -921,7 +921,6 @@ _Window::_Window()
        , __pOwner(null)
        , __pWindowDelegate(null)
        , __activated(false)
-       , __destroying(false)
        , __pRootVisualElement(null)
        , __pLayer(null)
        , __pDimmingLayer(null)
@@ -960,7 +959,7 @@ _Window::Deactivate(void)
 {
        __activated = false;
 
-       if (__destroying == false)
+       if (_Control::IsDestroying() == false)
        {
                GetWindowDelegate().OnDeactivated();
        }
index f4f2f45..e25334e 100644 (file)
@@ -602,6 +602,8 @@ protected:
        void AcquireHandle(void);
        void SetDataBindingContext(_DataBindingContext* pDataBindingContext);
        void DoBacktrace(Tizen::Base::Collection::ArrayListT<void*>* pBacktraceList);
+       void SetDestroying(bool destroying);
+       bool IsDestroying(void) const;
 
 private:
        _Control(const _Control& rhs);
index 6d523c3..db01d0b 100644 (file)
@@ -161,7 +161,6 @@ private:
        _Control* __pOwner;
        _IWindowDelegate* __pWindowDelegate;
        bool __activated;
-       bool __destroying;
 
        Tizen::Ui::Animations::_RootVisualElement* __pRootVisualElement;
        Tizen::Ui::Animations::_NativeLayer* __pLayer;