       @paletteCtx.setTransform 1, 0, 0, 1, -@scrollOffsets.palette.x, -@scrollOffsets.palette.y
       @paletteHighlightCtx.setTransform 1, 0, 0, 1, -@scrollOffsets.palette.x, -@scrollOffsets.palette.y
 
-
-      @redrawPalette()
+      @rebuildPalette()
 
 
   Editor::resize = ->

    'resize_palette': []    # after the palette is resized

    'redraw_main': []       # whenever we need to redraw the main canvas
    'redraw_palette': []    # whenever we need to redraw the palette
    'set_palette': []       # whenever we switch palette categories

    'mousedown': []


      @gutter.style.width = @aceEditor.renderer.$gutterLayer.gutterWidth + 'px'

      @redrawMain()
      @rebuildPalette()

  Editor::setFontFamily = (fontFamily) ->
    @draw.setGlobalFontFamily fontFamily
