Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ngscopeclient/scopehal-apps
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c7da605b32e4
Choose a base ref
...
head repository: ngscopeclient/scopehal-apps
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 96b49a75e9d4
Choose a head ref
  • 2 commits
  • 4 files changed
  • 1 contributor

Commits on Mar 16, 2020

  1. Copy the full SHA
    ca0d0b9 View commit details
  2. Copy the full SHA
    96b49a7 View commit details
Showing with 15 additions and 2 deletions.
  1. +5 −0 glscopeclient/OscilloscopeWindow.cpp
  2. +7 −2 glscopeclient/ScopeApp.cpp
  3. +2 −0 glscopeclient/ScopeApp.h
  4. +1 −0 glscopeclient/WaveformArea_events.cpp
5 changes: 5 additions & 0 deletions glscopeclient/OscilloscopeWindow.cpp
Original file line number Diff line number Diff line change
@@ -512,6 +512,11 @@ void OscilloscopeWindow::DoFileOpen(string filename, bool loadLayout, bool loadW
}
}

//Make sure all resize etc events have been handled before replaying history.
//Otherwise eye patterns don't refresh right.
show_all();
g_app->DispatchPendingEvents();

//TODO: make this work properly if we have decodes spanning multiple scopes
for(auto it : m_historyWindows)
it.second->ReplayHistory();
9 changes: 7 additions & 2 deletions glscopeclient/ScopeApp.cpp
Original file line number Diff line number Diff line change
@@ -66,8 +66,7 @@ void ScopeApp::run(string fileToLoad)
m_window->PollScopes();

//Dispatch events if we have any
while(Gtk::Main::events_pending())
Gtk::Main::iteration();
DispatchPendingEvents();

//Stop if the main window got closed
if(!m_window->is_visible())
@@ -80,6 +79,12 @@ void ScopeApp::run(string fileToLoad)
m_window = NULL;
}

void ScopeApp::DispatchPendingEvents()
{
while(Gtk::Main::events_pending())
Gtk::Main::iteration();
}

/**
@brief Shuts down the current session and disconnects from all instruments but don't close the window
*/
2 changes: 2 additions & 0 deletions glscopeclient/ScopeApp.h
Original file line number Diff line number Diff line change
@@ -53,6 +53,8 @@ class ScopeApp : public Gtk::Application

virtual void run(std::string fileToLoad);

void DispatchPendingEvents();

void ShutDownSession();

bool IsTerminating()
1 change: 1 addition & 0 deletions glscopeclient/WaveformArea_events.cpp
Original file line number Diff line number Diff line change
@@ -98,6 +98,7 @@ void WaveformArea::on_resize(int width, int height)
auto eye = dynamic_cast<EyeDecoder2*>(m_channel);
eye->SetWidth(m_width/4);
eye->SetHeight(m_height);
eye->Refresh();
}
else if(IsWaterfall())
{