     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++

    @trigger "updateLayer", @getActiveCellId(), @currentLayer.getSmoothedContourList()

  finishLayer : ->

    unless @currentLayer?
      return


  addToLayer : (pos) ->

    return if @handleModification()

    unless @currentLayer?
      return

