# HG changeset patch
# User Chris Cannam
# Date 1569401595 -3600
# Node ID 1057ae621c87aac2835cc628a147ea3f2c2e5170
# Parent 10f7d821095769b6f5ee2ef607ec71de831587f6
Rename time-frequency box to plain box; have it adopt the unit from the layer beneath if created empty
diff -r 10f7d8210957 -r 1057ae621c87 main/MainWindow.cpp
--- a/main/MainWindow.cpp Tue Sep 24 11:33:57 2019 +0100
+++ b/main/MainWindow.cpp Wed Sep 25 09:53:15 2019 +0100
@@ -4020,16 +4020,13 @@
Layer *newLayer = nullptr;
+ bool isNewEmptyLayer = false;
+
if (emptyTypes.find(type) != emptyTypes.end()) {
newLayer = m_document->createEmptyLayer(type);
if (newLayer) {
- for (auto &a : m_toolActions) {
- if (a.first == ViewManager::DrawMode) {
- a.second->trigger();
- break;
- }
- }
+ isNewEmptyLayer = true;
}
} else {
@@ -4068,6 +4065,23 @@
}
}
+ if (isNewEmptyLayer) {
+
+ double vmin, vmax, dmin, dmax;
+ QString unit;
+ if (pane->getTopLayerDisplayExtents
+ (vmin, vmax, dmin, dmax, &unit)) {
+ newLayer->adoptExtents(vmin, vmax, unit);
+ }
+
+ for (auto &a : m_toolActions) {
+ if (a.first == ViewManager::DrawMode) {
+ a.second->trigger();
+ break;
+ }
+ }
+ }
+
if (newLayer) {
m_document->addLayerToView(pane, newLayer);
m_paneStack->setCurrentLayer(pane, newLayer);
diff -r 10f7d8210957 -r 1057ae621c87 repoint-lock.json
--- a/repoint-lock.json Tue Sep 24 11:33:57 2019 +0100
+++ b/repoint-lock.json Wed Sep 25 09:53:15 2019 +0100
@@ -4,13 +4,13 @@
"pin": "0b6802e3b755"
},
"svcore": {
- "pin": "baafe1bb7e51"
+ "pin": "c2388289fce8"
},
"svgui": {
- "pin": "c5d2de8f7647"
+ "pin": "4eafe5a1b655"
},
"svapp": {
- "pin": "dde6ff56a84b"
+ "pin": "3e930ea94db6"
},
"checker": {
"pin": "c8c17e51aab0"
@@ -46,7 +46,7 @@
"pin": "f3731af47c4b"
},
"icons/scalable": {
- "pin": "a5a304f7bd01"
+ "pin": "be45984f7915"
}
}
}
diff -r 10f7d8210957 -r 1057ae621c87 sonic-visualiser.qrc
--- a/sonic-visualiser.qrc Tue Sep 24 11:33:57 2019 +0100
+++ b/sonic-visualiser.qrc Wed Sep 25 09:53:15 2019 +0100
@@ -61,7 +61,7 @@
icons/scalable/smooth.svg
icons/scalable/invert-colour.svg
icons/scalable/values.svg
- icons/scalable/timefreq.svg
+ icons/scalable/boxes.svg
icons/scalable/waveform.svg
icons/scalable/zoom.svg
icons/scalable/zoom-in.svg