(MMA 9.0.0 on Mac OS/X 10.8)
Please consider the following snippet (this is as SMALL as I could make it -- my attempts at making a smaller repro-case eliminated the effect that I am investigating)
Manipulate[
With[{img =
Image@RandomVariate[
NormalDistribution[0.5 + p - p, 0.25], {25, 25}]},
With[{grf =
(* comment the following line to stop
the double-evaluation *)
MorphologicalGraph@
ColorNegate@
Image@
WatershedComponents@
Binarize@
img},
GraphicsGrid[{{img, grf}}]
]],
(* click the + on the controller, wait a second,
and you will see double-evaluation *)
{p, 1, 10, 1,
Appearance -> "Open"}]
In the interactive block that results, press the + and - keys to advance or retract the value of p. If you are patient, on each press of + or -, after a delay of 1 second or so, the entire display will evaluate a second time. This behavior is rather obvious and jarring since the generated image and graph are random.
If you remove the call of MorphologicalGraph, the behavior does not happen. Somehow, MorphologicalGraph seems to be (hypothetically) causing an extra evaluation step after a 'settling time'.
I'd like to at least understand this behavior if not get rid of it.
Manipulate[Column[{Pause[0.2]; x, $PerformanceGoal, $ControlActiveSetting}], {x, 0, 1}, ContinuousAction -> False].ContinuousAction -> Falsefixes double evaluation when dragging the slider, but not when clicking the +/- buttons. The behaviour is the same in 8. – Szabolcs Feb 15 '13 at 16:32