     @setFilename 'New Model'
     @undoRedoManager.clearHistory()
 
-  removeSelectedNode: ->
+  removeSelectedNodes: ->
     selectedNodeKeys = (node.key for node in @selectedNodes())
     for nodeKey in selectedNodeKeys
       @removeNode nodeKey
 
-  removeSelectedLink: ->
+  removeSelectedLinks: ->
     for selectedLink in @selectedLinks()
       @removeLink selectedLink
 
   deleteSelected: ->
     log.info "Deleting selected items"
-    @removeSelectedNode()
-    @removeSelectedLink()
+    # deleting multiple links/nodes should be undoable as a single action
+    @undoRedoManager.startCommandBatch()
+    @removeSelectedLinks()
+    @removeSelectedNodes()
+    @undoRedoManager.endCommandBatch()
     @selectionManager.clearSelection()
 
   removeLinksForNode: (node) ->


    # create a copy of the list of links
    links = node.links.slice()

    @undoRedoManager.createAndExecuteCommand 'removeNode',
      execute: =>
        node.transferLink?.relation = node.transferLink.defaultRelation()
        @_removeLink(link) for link in links
        @_removeNode node
      undo: =>
        node.transferLink?.relation = transferRelation
        @_addNode node
        @_addLink(link) for link in links

  _addNode: (node) ->


  changeLink: (link, changes={}) ->
    if changes.deleted
      @removeSelectedLinks()
    else if link
      originalData =
        title: link.title
