Fix compile error. Non initialized variable.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / buttons / toggle-button-impl.cpp
index 6aaf423..e6c0ab7 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,7 +21,6 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/object/type-registry-helper.h>
-#include <dali/public-api/images/resource-image.h>
 #include <dali/devel-api/scripting/scripting.h>
 #include <dali/public-api/object/property-array.h>
 #include <dali/integration-api/debug.h>
@@ -110,7 +109,7 @@ void ToggleButton::OnInitialize()
 
   // Toggle button requires the Leave event.
   Actor self = Self();
-  self.SetLeaveRequired( true );
+  self.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
 }
 
 void ToggleButton::SetProperty( BaseObject* object, Property::Index propertyIndex, const Property::Value& value )