okra pushed a commit to branch master.

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

commit bcfd488e0f9dc59eeaac255c98ce320f2a2a25e8
Author: Stephen Houston <smhousto...@gmail.com>
Date:   Mon Jan 25 19:53:44 2016 -0600

    Ephoto: Fix some incorrect thumb selection issues.
---
 src/bin/ephoto.h               | 1 +
 src/bin/ephoto_main.c          | 8 ++++----
 src/bin/ephoto_thumb_browser.c | 1 +
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/bin/ephoto.h b/src/bin/ephoto.h
index 210d879..f7d2a22 100644
--- a/src/bin/ephoto.h
+++ b/src/bin/ephoto.h
@@ -191,6 +191,7 @@ struct _Ephoto
    Ephoto_State state, prev_state;
 
    Ephoto_Config *config;
+   Ephoto_Entry *thumb_entry;
 };
 
 struct _Ephoto_Entry
diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c
index d5f5371..e496687 100644
--- a/src/bin/ephoto_main.c
+++ b/src/bin/ephoto_main.c
@@ -38,11 +38,10 @@ _ephoto_thumb_browser_show(Ephoto *ephoto, Ephoto_Entry 
*entry)
    _ephoto_state_set(ephoto, EPHOTO_STATE_THUMB);
    ephoto_title_set(ephoto, ephoto->config->directory);
 
+   if (ephoto->thumb_entry)
+     elm_gengrid_item_selected_set(ephoto->thumb_entry->item, EINA_TRUE);
    if ((entry) && (entry->item))
-     {
-        elm_gengrid_item_selected_set(entry->item, EINA_TRUE);
-        elm_gengrid_item_bring_in(entry->item, ELM_GENGRID_ITEM_SCROLLTO_IN);
-     }
+     elm_gengrid_item_bring_in(entry->item, ELM_GENGRID_ITEM_SCROLLTO_IN);
 }
 
 static void
@@ -58,6 +57,7 @@ _ephoto_single_browser_show(Ephoto *ephoto, Ephoto_Entry 
*entry)
      ephoto_single_browser_entries_set(ephoto->single_browser,
          ephoto->entries);
 
+   ephoto->thumb_entry = entry;
    ephoto_single_browser_entry_set(ephoto->single_browser, entry);
    elm_naviframe_item_simple_promote(ephoto->pager, ephoto->single_browser);
    elm_object_focus_set(ephoto->single_browser, EINA_TRUE);
diff --git a/src/bin/ephoto_thumb_browser.c b/src/bin/ephoto_thumb_browser.c
index 230386c..c9b2b5e 100644
--- a/src/bin/ephoto_thumb_browser.c
+++ b/src/bin/ephoto_thumb_browser.c
@@ -1064,6 +1064,7 @@ _ephoto_thumb_activated(void *data, Evas_Object *obj 
EINA_UNUSED,
      {
         EINA_LIST_FOREACH(selected, s, item)
           {
+             elm_gengrid_item_selected_set(item, EINA_TRUE);
              tb->ephoto->selentries = eina_list_append(tb->ephoto->selentries,
                  elm_object_item_data_get(item));
           }

-- 


Reply via email to