diff Framework/Viewport/WidgetViewport.cpp @ 91:81f73efd81a1 wasm

cleaning up
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 29 May 2017 11:18:35 +0200
parents 02c3a7a4938f
children 2eca030792aa
line wrap: on
line diff
--- a/Framework/Viewport/WidgetViewport.cpp	Mon May 29 11:04:18 2017 +0200
+++ b/Framework/Viewport/WidgetViewport.cpp	Mon May 29 11:18:35 2017 +0200
@@ -74,7 +74,7 @@
     }
 
     backgroundChanged_ = true;
-    observers_.NotifyChange(this);
+    observers_.Apply(*this, &IObserver::NotifyChange);
 
     return *widget;
   }
@@ -83,7 +83,7 @@
   void WidgetViewport::NotifyChange(const IWidget& widget)
   {
     backgroundChanged_ = true;
-    observers_.NotifyChange(this);
+    observers_.Apply(*this, &IObserver::NotifyChange);
   }
 
 
@@ -97,7 +97,7 @@
       centralWidget_->SetSize(width, height);
     }
 
-    observers_.NotifyChange(this);
+    observers_.Apply(*this, &IObserver::NotifyChange);
   }
 
 
@@ -154,7 +154,7 @@
       mouseTracker_.reset(NULL);
     }      
 
-    observers_.NotifyChange(this);
+    observers_.Apply(*this, &IObserver::NotifyChange);
   }
 
 
@@ -164,7 +164,7 @@
     {
       mouseTracker_->MouseUp();
       mouseTracker_.reset(NULL);
-      observers_.NotifyChange(this);
+      observers_.Apply(*this, &IObserver::NotifyChange);
     }
   }
 
@@ -195,7 +195,7 @@
     if (repaint)
     {
       // The scene must be repainted, notify the observers
-      observers_.NotifyChange(this);
+      observers_.Apply(*this, &IObserver::NotifyChange);
     }
   }
 
@@ -203,7 +203,7 @@
   void WidgetViewport::MouseEnter()
   {
     isMouseOver_ = true;
-    observers_.NotifyChange(this);
+    observers_.Apply(*this, &IObserver::NotifyChange);
   }
 
 
@@ -217,7 +217,7 @@
       mouseTracker_.reset(NULL);
     }
 
-    observers_.NotifyChange(this);
+    observers_.Apply(*this, &IObserver::NotifyChange);
   }