X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fflag.cpp;h=380ef3273091b1f4d8d29f1bc68a5dd296e581da;hp=01d13670a70b87fbbb2042dcbb70c9278724e749;hb=48257a69ffad409c9893605d99cd6e15161dff4f;hpb=786b76785856c6cf8f5916c0b8d76a61695762f9 diff --git a/pv/view/flag.cpp b/pv/view/flag.cpp index 01d13670..380ef327 100644 --- a/pv/view/flag.cpp +++ b/pv/view/flag.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include @@ -37,7 +37,7 @@ namespace view { const QColor Flag::FillColour(0x73, 0xD2, 0x16); -Flag::Flag(View &view, double time, const QString &text) : +Flag::Flag(View &view, const pv::util::Timestamp& time, const QString &text) : TimeMarker(view, FillColour, time), text_(text) { @@ -108,5 +108,15 @@ void Flag::on_text_changed(const QString &text) view_.time_item_appearance_changed(true, false); } +void Flag::drag_by(const QPoint &delta) +{ + // Treat trigger markers as immovable + if (text_ == "T") + return; + + TimeMarker::drag_by(delta); +} + + } // namespace view } // namespace pv