AlarmProviderFile: fix bug with wrong object edition.
authorLukasz Stanislawski <l.stanislaws@samsung.com>
Fri, 16 Sep 2016 14:43:13 +0000 (16:43 +0200)
committerŁukasz Stanisławski <l.stanislaws@samsung.com>
Fri, 16 Sep 2016 15:47:14 +0000 (17:47 +0200)
Instead of object from AlarmProviderFile container the temporary
object has been used by the presenters.

Change-Id: I26d61ec52a6ef30e0667450f89adc5bc0432f5fc

clock/src/Model/AlarmProviderFile.cpp

index 6c97ec7..038696d 100644 (file)
@@ -20,7 +20,7 @@ void AlarmProviderFile::Add(model::Alarm& alarm)
 
        if (it == alarms.end()) {
                alarms.push_back(alarm);
-               EventBus::FireEvent(new AlarmAddedEvent(alarm));
+               EventBus::FireEvent(new AlarmAddedEvent(alarms.back()));
        }
        Sync();
 }