Skip to content

Commit

Permalink
[#40] Track Map: General improvements and bugfixes (Part 18.3: Fixed …
Browse files Browse the repository at this point in the history
…uninitialized time information)
  • Loading branch information
tomas-nestorovic committed Aug 22, 2020
1 parent 739df31 commit 6c387a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Main/src/ViewTrackMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,14 +509,14 @@
OnPrepareDC(&dc);
dc.DPtoLP(&point);
point.y-=TRACK0_Y;
rOutNanoseconds=-1; // initialization (time could not be determined)
if (point.y>=0 && point.y<IMAGE->GetTrackCount()*TRACK_HEIGHT){
// cursor over a Track
// . estimating the time on timeline at which the cursor points to
if (showTimed){
const int ns=((point.x-SECTOR1_X)<<zoomLengthFactor)*IMAGE->EstimateNanosecondsPerOneByte();
rOutNanoseconds= ns<=longestTrackNanoseconds ? ns : -1;
}else
rOutNanoseconds=-1;
}
// . determining the Sector on which the cursor hovers
const TTrack track=point.y/TRACK_HEIGHT;
const THead nSides=__getNumberOfFormattedSidesInImage__(IMAGE);
Expand Down

0 comments on commit 6c387a8

Please sign in to comment.