Add GetMouseButton to identify right/left mouse button click
[platform/core/uifw/dali-core.git] / dali / public-api / events / tap-gesture.cpp
index 08763b4..d20afc4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
@@ -39,11 +39,14 @@ TapGesture::TapGesture( const TapGesture& rhs )
 
 TapGesture& TapGesture::operator=( const TapGesture& rhs )
 {
-  Gesture::operator=(rhs);
-  numberOfTaps = rhs.numberOfTaps;
-  numberOfTouches = rhs.numberOfTouches;
-  screenPoint = rhs.screenPoint;
-  localPoint = rhs.localPoint;
+  if( this != &rhs )
+  {
+    Gesture::operator=(rhs);
+    numberOfTaps = rhs.numberOfTaps;
+    numberOfTouches = rhs.numberOfTouches;
+    screenPoint = rhs.screenPoint;
+    localPoint = rhs.localPoint;
+  }
 
   return *this;
 }