Mercurial > hg > sonic-visualiser
comparison main/MainWindow.cpp @ 2370:95c082557ffd
Fix #1942 Box layer not always inheriting the right unit
author | Chris Cannam |
---|---|
date | Tue, 15 Oct 2019 11:47:01 +0100 |
parents | bc4205d70e8b |
children | 59b7fa58c0af |
comparison
equal
deleted
inserted
replaced
2369:d96816b824c2 | 2370:95c082557ffd |
---|---|
4066 } | 4066 } |
4067 } | 4067 } |
4068 | 4068 |
4069 if (isNewEmptyLayer) { | 4069 if (isNewEmptyLayer) { |
4070 | 4070 |
4071 double vmin, vmax, dmin, dmax; | 4071 double min, max; |
4072 bool log; | |
4072 QString unit; | 4073 QString unit; |
4073 if (pane->getTopLayerDisplayExtents | 4074 if (pane->getVisibleExtentsForAnyUnit(min, max, log, unit)) { |
4074 (vmin, vmax, dmin, dmax, &unit)) { | 4075 newLayer->adoptExtents(min, max, unit); |
4075 newLayer->adoptExtents(vmin, vmax, unit); | |
4076 } | 4076 } |
4077 | 4077 |
4078 for (auto &a : m_toolActions) { | 4078 for (auto &a : m_toolActions) { |
4079 if (a.first == ViewManager::DrawMode) { | 4079 if (a.first == ViewManager::DrawMode) { |
4080 a.second->trigger(); | 4080 a.second->trigger(); |