elementary: fix promote on first item and demote on last item of a genlist
authorMichael BOUCHAUD <michael.bouchaud@gmail.com>
Tue, 23 Oct 2012 15:13:09 +0000 (15:13 +0000)
committerMichael BOUCHAUD <michael.bouchaud@gmail.com>
Tue, 23 Oct 2012 15:13:09 +0000 (15:13 +0000)
SVN revision: 78375

src/lib/elm_genlist.c

index cc46c6e..76b2580 100644 (file)
@@ -3723,6 +3723,7 @@ _item_move_after(Elm_Gen_Item *it,
 {
    if (!it) return;
    if (!after) return;
+   if (it == after) return;
 
    GL_IT(it)->wsd->items =
      eina_inlist_remove(GL_IT(it)->wsd->items, EINA_INLIST_GET(it));
@@ -3747,6 +3748,7 @@ _item_move_before(Elm_Gen_Item *it,
 {
    if (!it) return;
    if (!before) return;
+   if (it == before) return;
 
    GL_IT(it)->wsd->items =
      eina_inlist_remove(GL_IT(it)->wsd->items, EINA_INLIST_GET(it));