summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-10-28 15:29:11 -0400
committerJesse Luehrs <doy@tozt.net>2014-10-28 15:29:11 -0400
commitbcfb6e409c1947cf90b852ca8796bf4da374eac8 (patch)
tree0db416d4e5aceeb6e8ce024a49b90f23d74db7a3
parent21d89e4e23d46765fb7edc2302eaf102b6349b90 (diff)
downloadjulia-fractals-bcfb6e409c1947cf90b852ca8796bf4da374eac8.tar.gz
julia-fractals-bcfb6e409c1947cf90b852ca8796bf4da374eac8.zip
make starting a rubberband stop the rendering process
-rw-r--r--src/renderer.jl10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/renderer.jl b/src/renderer.jl
index f2b7355..4ec1275 100644
--- a/src/renderer.jl
+++ b/src/renderer.jl
@@ -25,6 +25,9 @@ type FractalCanvas
ImageView.resize(imgc, img2)
end
bind(c, "<Double-Button-1>", function(path,x,y)
+ if isready(rref)
+ take!(rref)
+ end
put!(rref, true)
fractal(c, make_c, step, false)
end)
@@ -48,9 +51,16 @@ type FractalCanvas
xmax = xmin + (ymax - ymin)
end
range = Base.Graphics.BoundingBox(xmin, xmax, ymin, ymax)
+ if isready(rref)
+ take!(rref)
+ end
put!(rref, true)
fractal(c, make_c, step, false, range=range)
end
+ if isready(rref)
+ take!(rref)
+ end
+ put!(rref, true)
ImageView.rubberband_start(c, x, y, rubberband_end)
end
return fc