X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Ftrace.cpp;h=8511f7507cdec68e759b9c32d5af33e8c958cccc;hp=fe5cc281d46984c27aa331910f84e926b11f2dee;hb=119c5c232ef47e92ef6a5cc9f8b7c4c31dc2f387;hpb=a20c1fcc6c86659439a368f4d56c1b60c70dc62c diff --git a/pv/views/trace/trace.cpp b/pv/views/trace/trace.cpp index fe5cc281..8511f750 100644 --- a/pv/views/trace/trace.cpp +++ b/pv/views/trace/trace.cpp @@ -87,11 +87,15 @@ bool Trace::is_selectable(QPoint pos) const return (pos.x() <= view->header_width()); } -bool Trace::is_draggable() const +bool Trace::is_draggable(QPoint pos) const { // While the header label that belongs to this trace is draggable, - // the trace itself shall not be - return false; + // the trace itself shall not be. Hence we return true if the header + // was clicked and false if the trace area was clicked + const View *view = owner_->view(); + assert(view); + + return (pos.x() <= view->header_width()); } void Trace::set_segment_display_mode(SegmentDisplayMode mode)