jaehyun pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=202fecd511db5aa27934c69e2a7c25b08ab9ca96

commit 202fecd511db5aa27934c69e2a7c25b08ab9ca96
Author: Jaehyun Cho <jae_hyun....@samsung.com>
Date:   Tue Aug 23 23:47:28 2016 +0900

    file_mgr: Do not replace current main file if it is the new main file.
    
    Replace the current main file to a sub file if it is not the new main
    file.
---
 src/bin/file_mgr.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/bin/file_mgr.c b/src/bin/file_mgr.c
index 215d66c..183df9e 100644
--- a/src/bin/file_mgr.c
+++ b/src/bin/file_mgr.c
@@ -333,10 +333,18 @@ file_mgr_main_file_set(const char *path)
         const char *prev_path = enventor_item_file_get(main_it);
         if (prev_path)
           {
-             Enventor_Item *it2 = file_mgr_sub_file_add(prev_path, EINA_FALSE);
+             //Replace the current main file if it is not the new main file.
+             if (strcmp(realpath, prev_path))
+               {
+                  Enventor_Item *it2 = file_mgr_sub_file_add(prev_path,
+                                                             EINA_FALSE);
+                  if (fmd->focused_it == main_it)
+                    fmd->focused_it = it2;
+               }
+             else
+               replace_focus = EINA_TRUE;
+
              file_mgr_file_del(main_it);
-             if (!fmd->focused_it)
-               fmd->focused_it = it2;
           }
      }
 

-- 


Reply via email to