return base_;
}
+void DecodeTrace::set_owner(TraceTreeItemOwner *owner)
+{
+ Trace::set_owner(owner);
+
+ // The owner is set in trace::View::signals_changed(), which is a slot.
+ // So after this trace was added to the view, we won't have an owner
+ // that we need to initialize in update_rows(). Once we do, we call it
+ // from on_decode_reset().
+ on_decode_reset();
+}
+
pair<int, int> DecodeTrace::v_extents() const
{
// Make an empty decode trace appear symmetrical
void DecodeTrace::update_rows()
{
+ if (!owner_)
+ return;
+
lock_guard<mutex> lock(row_modification_mutex_);
for (DecodeTraceRow& r : rows_)
shared_ptr<SignalBase> base() const;
+ /**
+ * Sets the owner this trace in the view trace hierachy.
+ * @param The new owner of the trace.
+ */
+ virtual void set_owner(TraceTreeItemOwner *owner);
+
/**
* Computes the vertical extents of the contents of this row item.
* @return A pair containing the minimum and maximum y-values.
* Sets the owner this trace in the view trace hierachy.
* @param The new owner of the trace.
*/
- void set_owner(TraceTreeItemOwner *owner);
+ virtual void set_owner(TraceTreeItemOwner *owner);
/**
* Gets the visual y-offset of the axis.