     # if e.originalEvent.nativeEvent.button == 2
     #   @onSpriteContextMenu e
 
+  onStageMouseDown: (e) ->
+    return unless @addThangSprite?.thangType.get('kind') is 'Wall'
+    @surface.camera.dragDisabled = true
+    @paintingWalls = true
+
   onStageMouseUp: (e) ->
-    if @addThangSprite
+    if @paintingWalls
+      # We need to stop painting walls, but we may also stop in onExtantThangSelected.
+      _.defer =>
+        @paintingWalls = false
+        @surface.camera.dragDisabled = false
+    else if @addThangSprite
       @surface.camera.lock()
       # If we click on the background, we need to add @addThangSprite, but not if onSpriteMouseUp will fire.
       @backgroundAddClickTimeout = _.defer => @onExtantThangSelected {}

    @selectedExtantSprite?.setNameLabel? null unless @selectedExtantSprite is e.sprite
    @selectedExtantThang = e.thang
    @selectedExtantSprite = e.sprite
    if e.thang and (key.alt or key.meta)
      # We alt-clicked, so create a clone addThang
      @selectAddThangType e.thang.spriteName, @selectedExtantThang
    else if @justAdded()

    'sprite:mouse-up': 'onSpriteMouseUp'
    'sprite:mouse-down': 'onSpriteMouseDown'
    'sprite:double-clicked': 'onSpriteDoubleClicked'
    'surface:stage-mouse-down': 'onStageMouseDown'
    'surface:stage-mouse-up': 'onStageMouseUp'
    'editor:random-terrain-generated': 'onRandomTerrainGenerated'

