track: store height in "units" rather than pixels

Fixes DPI scalability issue if a project ever moved from a display with
one DPI to another.
This commit is contained in:
itsmattkc
2020-08-22 00:23:46 +10:00
parent 48ac8ea509
commit f0928814fc
8 changed files with 63 additions and 42 deletions
+2 -2
View File
@@ -190,7 +190,7 @@ void TrackList::TrackConnected(NodeEdgePtr edge)
connect(connected_track, &TrackOutput::BlockAdded, this, &TrackList::TrackAddedBlock);
connect(connected_track, &TrackOutput::BlockRemoved, this, &TrackList::TrackRemovedBlock);
connect(connected_track, &TrackOutput::TrackLengthChanged, this, &TrackList::UpdateTotalLength);
connect(connected_track, &TrackOutput::TrackHeightChanged, this, &TrackList::TrackHeightChangedSlot);
connect(connected_track, &TrackOutput::TrackHeightChangedInPixels, this, &TrackList::TrackHeightChangedSlot);
connected_track->set_track_type(type_);
@@ -233,7 +233,7 @@ void TrackList::TrackDisconnected(NodeEdgePtr edge)
disconnect(track, &TrackOutput::BlockAdded, this, &TrackList::TrackAddedBlock);
disconnect(track, &TrackOutput::BlockRemoved, this, &TrackList::TrackRemovedBlock);
disconnect(track, &TrackOutput::TrackLengthChanged, this, &TrackList::UpdateTotalLength);
disconnect(track, &TrackOutput::TrackHeightChanged, this, &TrackList::TrackHeightChangedSlot);
disconnect(track, &TrackOutput::TrackHeightChangedInPixels, this, &TrackList::TrackHeightChangedSlot);
emit TrackListChanged();