       @selection = new Selection(this, @svg, margin)
 
       @items = new Items(this, @linesContainer)
-      @items.onUpdate.add () => @_isDirty = true
+      @items.onUpdate.add(@onUpdate)
       @keysPreview = new KeysPreview(this, @linesContainer)
 
       @properties = new Properties(this)

        @keys.selectNewKey(newKey, keyContainer)
      @errors = new Errors(this)
      @keys = new Keys(this)
      @keys.onKeyUpdated.add () => @_isDirty = true

      @xAxisGrid = d3.svg.axis()
        .scale(@x)

        @header.resize(INNER_WIDTH)
        @render()

    onUpdate: () =>
      @editor.render(false, true)

    onDurationChanged: (seconds) =>
      #@_isDirty = true
      #@render()
