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: e8fbf4448795
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: 38fd84541508
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Apr 27, 2021

  1. WaveformArea: if the cursor never leaves the channel infobox, don't r…

    …egister motion as a drag event. Fixes #322.
    azonenberg committed Apr 27, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    38fd845 View commit details
Showing with 14 additions and 1 deletion.
  1. +1 −1 lib
  2. +13 −0 src/glscopeclient/WaveformArea_events.cpp
2 changes: 1 addition & 1 deletion lib
13 changes: 13 additions & 0 deletions src/glscopeclient/WaveformArea_events.cpp
Original file line number Diff line number Diff line change
@@ -486,6 +486,7 @@ bool WaveformArea::on_button_release_event(GdkEventButton* event)
event->y *= scale;

int64_t timestamp = XPositionToXAxisUnits(event->x);
auto region = HitTest(event->x, event->y);

switch(m_dragState)
{
@@ -535,6 +536,10 @@ bool WaveformArea::on_button_release_event(GdkEventButton* event)
case DRAG_WAVEFORM_AREA:
if(m_dropTarget != NULL)
{
//If dragging to the same area, don't register the hit
if( (m_dropTarget->m_group == m_group) && (region == LOC_CHAN_NAME) )
break;

//Move us to a new group if needed
if(m_dropTarget->m_group != m_group)
m_parent->OnMoveToExistingGroup(this, m_dropTarget->m_group);
@@ -760,6 +765,14 @@ bool WaveformArea::on_motion_notify_event(GdkEventMotion* event)
//Move this waveform area to a new place
case DRAG_WAVEFORM_AREA:
{
//If we're still over the infobox, don't register it as a drag
if(m_mouseElementPosition == WaveformArea::LOC_CHAN_NAME)
{
m_insertionBarLocation = INSERT_NONE;
queue_draw();
break;
}

//Window coordinates of our cursor
int window_x;
int window_y;