MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / timebase_changed

Method timebase_changed

DSView/pv/view/view.cpp:329–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327}
328
329void View::timebase_changed()
330{
331 int width = get_view_width();
332 if (width == 0){
333 return;
334 }
335
336 if (_device_agent->get_work_mode() != DSO){
337 return;
338 }
339
340 double scale = this->scale();
341 double hori_res = _sampling_bar->get_hori_res();
342
343 if (hori_res > 0){
344 scale = _session->cur_view_time() / width;
345 }
346
347 set_scale_offset(scale, this->offset());
348}
349
350void View::set_scale_offset(double scale, int64_t offset)
351{

Callers 1

OnMessageMethod · 0.80

Calls 5

scaleMethod · 0.95
offsetMethod · 0.95
get_work_modeMethod · 0.80
cur_view_timeMethod · 0.80
get_hori_resMethod · 0.45

Tested by

no test coverage detected