Don't trigger delete event on move to avoid switching to root document

This commit is contained in:
James Allen 2016-02-10 15:26:26 +00:00
parent 1d13015726
commit d47f6801c2

View file

@ -71,6 +71,7 @@ define [
@$scope.$apply () =>
@_deleteEntityFromScope entity
@recalculateDocList()
@$scope.$emit "entity:deleted", entity
@ide.socket.on "reciveEntityMove", (entity_id, folder_id) =>
entity = @findEntityById(entity_id)
@ -368,8 +369,6 @@ define [
entity.deleted = true
@$scope.deletedDocs.push entity
@$scope.$emit "entity:deleted", entity
_moveEntityInScope: (entity, parent_folder) ->
return if entity in parent_folder.children
@_deleteEntityFromScope(entity, moveToDeleted: false)