From 0c2f6bb176f282c3d8846df7c1b250f695c7b1df Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Wed, 20 Dec 2017 10:55:40 -0500 Subject: [PATCH] Fix end of range of TrackPanelCellIterator --- src/TrackPanel.cpp | 2 ++ src/TrackPanelCellIterator.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/TrackPanel.cpp b/src/TrackPanel.cpp index 0c62bfa65..a3be6b483 100644 --- a/src/TrackPanel.cpp +++ b/src/TrackPanel.cpp @@ -3454,6 +3454,8 @@ TrackPanelCellIterator::TrackPanelCellIterator(TrackPanel *trackPanel, bool begi else mpCell = trackPanel->GetBackgroundCell(); } + else + mDidBackground = true; const auto size = mPanel->GetSize(); mRect = { 0, 0, size.x, size.y }; diff --git a/src/TrackPanelCellIterator.h b/src/TrackPanelCellIterator.h index ae5022781..e34bd953e 100644 --- a/src/TrackPanelCellIterator.h +++ b/src/TrackPanelCellIterator.h @@ -43,7 +43,8 @@ public: friend inline bool operator== (const TrackPanelCellIterator &lhs, const TrackPanelCellIterator &rhs) { - return lhs.mpCell == rhs.mpCell; + return lhs.mpCell == rhs.mpCell && + lhs.mDidBackground == rhs.mDidBackground; } value_type operator * () const;