okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=485d0342d783566f7bb375dafca73cb818b70749

commit 485d0342d783566f7bb375dafca73cb818b70749
Author: Stephen Houston <smhousto...@gmail.com>
Date:   Fri Oct 30 14:50:13 2015 -0500

    Ephoto: Make sure to reset changes on cancel.
---
 src/bin/ephoto_bcg.c   | 9 +++++++++
 src/bin/ephoto_color.c | 9 +++++++++
 src/bin/ephoto_hsv.c   | 9 +++++++++
 3 files changed, 27 insertions(+)

diff --git a/src/bin/ephoto_bcg.c b/src/bin/ephoto_bcg.c
index d183990..70401c7 100644
--- a/src/bin/ephoto_bcg.c
+++ b/src/bin/ephoto_bcg.c
@@ -238,6 +238,7 @@ static void
 _bcg_reset(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
 {
    Ephoto_BCG *ebcg = data;
+
    elm_slider_value_set(ebcg->bslider, 0);
    elm_slider_value_set(ebcg->cslider, 0);
    elm_slider_value_set(ebcg->gslider, 1);
@@ -264,6 +265,14 @@ static void
 _bcg_cancel(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
 {
    Ephoto_BCG *ebcg = data;
+
+   elm_slider_value_set(ebcg->bslider, 0);
+   elm_slider_value_set(ebcg->cslider, 0);
+   elm_slider_value_set(ebcg->gslider, 1);
+   ebcg->brightness = 0;
+   ebcg->contrast = 0;
+   ebcg->gamma = 1;
+   _brightness_slider_changed(ebcg, ebcg->bslider, NULL);
    ephoto_single_browser_cancel_editing(ebcg->main, ebcg->image);
    evas_object_del(ebcg->frame);
 }
diff --git a/src/bin/ephoto_color.c b/src/bin/ephoto_color.c
index c8987bd..218c960 100644
--- a/src/bin/ephoto_color.c
+++ b/src/bin/ephoto_color.c
@@ -228,6 +228,7 @@ static void
 _color_reset(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
 {
    Ephoto_Color *eco = data;
+
    elm_slider_value_set(eco->rslider, 0);
    elm_slider_value_set(eco->gslider, 0);
    elm_slider_value_set(eco->bslider, 0);
@@ -254,6 +255,14 @@ static void
 _color_cancel(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
 {
    Ephoto_Color *eco = data;
+
+   elm_slider_value_set(eco->rslider, 0);
+   elm_slider_value_set(eco->gslider, 0);
+   elm_slider_value_set(eco->bslider, 0);
+   eco->red = 0;
+   eco->green = 0;
+   eco->blue = 0;
+   _red_slider_changed(eco, eco->rslider, NULL);
    ephoto_single_browser_cancel_editing(eco->main, eco->image);
    evas_object_del(eco->frame);
 }
diff --git a/src/bin/ephoto_hsv.c b/src/bin/ephoto_hsv.c
index 8fabc1d..12df48a 100644
--- a/src/bin/ephoto_hsv.c
+++ b/src/bin/ephoto_hsv.c
@@ -249,6 +249,7 @@ static void
 _hsv_reset(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
 {
    Ephoto_HSV *ehsv = data;
+
    elm_slider_value_set(ehsv->hslider, 0);
    elm_slider_value_set(ehsv->sslider, 0);
    elm_slider_value_set(ehsv->vslider, 0);
@@ -275,6 +276,14 @@ static void
 _hsv_cancel(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
 {
    Ephoto_HSV *ehsv = data;
+
+   elm_slider_value_set(ehsv->hslider, 0);
+   elm_slider_value_set(ehsv->sslider, 0);
+   elm_slider_value_set(ehsv->vslider, 0);
+   ehsv->hue = 0;
+   ehsv->saturation = 0;
+   ehsv->value = 0;
+   _hue_slider_changed(ehsv, ehsv->hslider, NULL);
    ephoto_single_browser_cancel_editing(ehsv->main, ehsv->image);
    evas_object_del(ehsv->frame);
 }

-- 


Reply via email to