     @trigger "updateLayer", @getActiveCellId(), @currentLayer.getSmoothedContourList()
 
   finishLayer : ->
+
+    return if @handleModification()
 
     unless @currentLayer?
       return

  startEditing : (planeId) ->
    # Return, if layer was actually started

    if currentLayer? or @flycam.getIntegerZoomStep() > 0
      return false


    window.setSmoothLength = (v) -> Drawing.setSmoothLength(v)


  # Should be called whenever the model is modified
  # Returns whether the modification should be aborted
  # ==> return if @handleModification()
  handleModification : ->

    return true


  createCell : (id) ->

    return if @handleModification()

    unless id?
      id = @idCount++
