#include "cursorpair.hpp"
+#include "pv/util.hpp"
#include "ruler.hpp"
#include "view.hpp"
-#include "pv/util.hpp"
-#include <cassert>
#include <algorithm>
+#include <cassert>
using std::max;
using std::make_pair;
}
}
-void CursorPair::paint_back(QPainter &p, const ViewItemPaintParams &pp)
+void CursorPair::paint_back(QPainter &p, ViewItemPaintParams &pp)
{
if (!enabled())
return;
assert(first_);
assert(second_);
- return pair<float, float>(
- ((first_->time() - view_.offset()) / view_.scale()).convert_to<float>(),
- ((second_->time() - view_.offset()) / view_.scale()).convert_to<float>());
+ return pair<float, float>(first_->get_x(), second_->get_x());
}
} // namespace TraceView