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

Method normalize_layout

DSView/pv/view/view.cpp:579–597  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

577}
578
579void View::normalize_layout()
580{
581 int v_min = INT_MAX;
582 std::vector<Trace*> traces;
583 get_traces(ALL_VIEW, traces);
584
585 for(auto t : traces){
586 v_min = min(t->get_v_offset(), v_min);
587 }
588
589 const int delta = -min(v_min, 0);
590
591 for(auto t : traces){
592 t->set_v_offset(t->get_v_offset() + delta);
593 }
594
595 verticalScrollBar()->setSliderPosition(delta);
596 v_scroll_value_changed(verticalScrollBar()->sliderPosition());
597}
598
599void View::get_scroll_layout(int64_t &length, int64_t &offset)
600{

Callers 1

mouseReleaseEventMethod · 0.80

Calls 2

get_v_offsetMethod · 0.80
set_v_offsetMethod · 0.80

Tested by

no test coverage detected