X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Fcursorpair.cpp;h=24d036652d763ca6d9a4be898a2cdcbeedd35020;hb=cb5a1216019ae561046f7812b7fc67c11ea3d6c5;hp=e2c80833f2503631814a5ee1888f1088af13da69;hpb=f4e57597347e47a4ea58fbdc7b0a22e07f1c0ede;p=pulseview.git diff --git a/pv/view/cursorpair.cpp b/pv/view/cursorpair.cpp index e2c8083..24d0366 100644 --- a/pv/view/cursorpair.cpp +++ b/pv/view/cursorpair.cpp @@ -14,18 +14,17 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * along with this program; if not, see . */ #include "cursorpair.hpp" +#include "pv/util.hpp" #include "ruler.hpp" #include "view.hpp" -#include "pv/util.hpp" -#include #include +#include using std::max; using std::make_pair; @@ -188,9 +187,7 @@ pair CursorPair::get_cursor_offsets() const assert(first_); assert(second_); - return pair( - ((first_->time() - view_.offset()) / view_.scale()).convert_to(), - ((second_->time() - view_.offset()) / view_.scale()).convert_to()); + return pair(first_->get_x(), second_->get_x()); } } // namespace TraceView