# | Line 138 | Line 138 | class RtraceSimulManager : public RadSimulManager { (p | |
---|---|---|
138 | cookedCall = cb; | |
139 | ccData = cb ? cd : NULL; | |
140 | } | |
141 | < | /// Set/change trace callback (before threading) |
141 | > | /// Set/change trace callback |
142 | void SetTraceCall(RayReportCall *cb, void *cd = NULL) { | |
143 | + | if (cb == traceCall) { |
144 | + | if (cb) tcData = cd; |
145 | + | return; |
146 | + | } |
147 | + | int nt = NThreads(); |
148 | + | if (nt > 1) SetThreadCount(1); |
149 | traceCall = cb; | |
150 | tcData = cb ? cd : NULL; | |
151 | + | if (nt > 1) SetThreadCount(nt); |
152 | } | |
153 | /// Are we ready? | |
154 | bool Ready() const { |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |