Skip to content

Commit

Permalink
Update #268 : When active filter clock icon cicked, switch off all re…
Browse files Browse the repository at this point in the history
…ference clocks (clock icon now works as toggle)
  • Loading branch information
mikecopperwhite committed Jul 6, 2015
1 parent 453bfc4 commit ff3afea
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/graphView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1666,12 +1666,7 @@ void CGraphView::OnTimer(UINT_PTR nIDEvent)

void CGraphView::OnUseClock()
{
if (graph.uses_clock) {
graph.SetClock(false, NULL);
} else {
graph.SetClock(true, NULL);
}

graph.SetClock(!graph.uses_clock, NULL);
graph.Dirty();
Invalidate();
}
Expand Down Expand Up @@ -2514,7 +2509,9 @@ void CGraphView::OnOverlayIconClick(GraphStudio::OverlayIcon *icon, CPoint point
{
// set this new clock
if (icon->filter && icon->filter->clock) {
graph.SetClock(false, icon->filter->clock);
CComPtr<IReferenceClock> syncclock;
const bool we_are_sync_source = SUCCEEDED(icon->filter->filter->GetSyncSource(&syncclock)) && (syncclock == icon->filter->clock);
graph.SetClock(false, we_are_sync_source ? NULL : icon->filter->clock); // if currently the active clock, turn off clocks
graph.Dirty();
Invalidate();
}
Expand Down

0 comments on commit ff3afea

Please sign in to comment.