]> sigrok.org Git - pulseview.git/commitdiff
Header/Viewport: Manually trigger the signals_changed event at construction
authorJoel Holdsworth <redacted>
Sat, 22 Mar 2014 10:20:44 +0000 (10:20 +0000)
committerJoel Holdsworth <redacted>
Sat, 22 Mar 2014 10:38:47 +0000 (10:38 +0000)
This fixes #338

pv/view/header.cpp
pv/view/view.cpp
pv/view/viewport.cpp

index af67abddd899f401b01eeb3d8665e271f959547c..a7902521216a90655ba708669ab5b36b2886f52b 100644 (file)
@@ -59,6 +59,10 @@ Header::Header(View &parent) :
 
        connect(&_view, SIGNAL(signals_moved()),
                this, SLOT(on_signals_moved()));
+
+       // Trigger the initial event manually. The default device has signals
+       // which were created before this object came into being
+       on_signals_changed();
 }
 
 QSize Header::sizeHint() const
index 219543338f98af77d22c4db8583cb7aeb0389383..d117489577bc02e99edb171906e965eaeeaa15b3 100644 (file)
@@ -123,6 +123,8 @@ View::View(SigSession &session, QWidget *parent) :
        _ruler->installEventFilter(this);
        _header->installEventFilter(this);
 
+       // Trigger the initial event manually. The default device has signals
+       // which were created before this object came into being
        signals_changed();
 }
 
index e9a1442217d7bc1bd600f6432e0002c7ed0543e3..3b06cf9e85e0bc31a5c8f4e7edba38be8aaaa119 100644 (file)
@@ -49,6 +49,10 @@ Viewport::Viewport(View &parent) :
 
        connect(&_view, SIGNAL(signals_moved()),
                this, SLOT(on_signals_moved()));
+
+       // Trigger the initial event manually. The default device has signals
+       // which were created before this object came into being
+       on_signals_changed();
 }
 
 int Viewport::get_total_height() const