yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=33adacc2906c77c8dff6359555faa0f51163b333

commit 33adacc2906c77c8dff6359555faa0f51163b333
Author: Yakov Goldberg <yako...@samsung.com>
Date:   Sun Nov 29 14:34:20 2015 +0200

    Delete dummy widget id DnD is not accepted
    
    When dragging swallow object, dummy widget is created on its place.
    If drag was not accepted all mementos should be discarded.
    This pach handles case of deleting dummy widget.
---
 src/bin/gui/editor.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/bin/gui/editor.c b/src/bin/gui/editor.c
index d959672..e4962cd 100644
--- a/src/bin/gui/editor.c
+++ b/src/bin/gui/editor.c
@@ -2744,6 +2744,21 @@ _dragdone_post_cb(Eina_Bool accept, const Eo *wdg_eo, 
const Gui_Widget *drag_sta
                         manager_widget_create(session, wdg, NULL);
                         break;
                      }
+                /* Currently only dummy widget can be created on drag start.
+                 * If in the end drag is not accepted, delete this widget. */
+                case MEMENTO_WIDGET:
+                     {
+                        if (eid_is_dummy(wdg_eid_get(wdg)))
+                          {
+                             manager_widget_delete(session, wdg, NULL);
+                             wdg_del(wdg);
+                          }
+                        else
+                          {
+                             ERR("This case is not handeled");
+                          }
+                        break;
+                     }
                 default:
                    ERR("case - default");
                }

-- 


Reply via email to