X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Ftrace.cpp;h=bbd0115fb65af00512508c7129d3e6399b12a3a2;hp=fe5cc281d46984c27aa331910f84e926b11f2dee;hb=39dce56b0e0b4daba503663e44ee6c86a754ddc2;hpb=cbd9ec7f751a5403d1465e966ccecd31b7086e8a diff --git a/pv/views/trace/trace.cpp b/pv/views/trace/trace.cpp index fe5cc28..bbd0115 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) @@ -106,6 +110,10 @@ void Trace::on_setting_changed(const QString &key, const QVariant &value) { if (key == GlobalSettings::Key_View_ShowHoverMarker) show_hover_marker_ = value.toBool(); + + // Force a repaint since many options alter the way traces look + if (owner_) + owner_->row_item_appearance_changed(false, true); } void Trace::paint_label(QPainter &p, const QRect &rect, bool hover)