diff framework/MainWindowBase.cpp @ 637:109a1dd59f45

Ensure that undo restores deleted pane's layers in their original order
author Chris Cannam
date Thu, 29 Nov 2018 14:25:50 +0000
parents 29bef008588e
children 8c5379570f36 f54722b34c3a
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp	Fri Nov 09 15:38:49 2018 +0000
+++ b/framework/MainWindowBase.cpp	Thu Nov 29 14:25:50 2018 +0000
@@ -3985,7 +3985,7 @@
         (tr("Delete Pane"), true);
 
     while (pane->getLayerCount() > 0) {
-        Layer *layer = pane->getLayer(0);
+        Layer *layer = pane->getLayer(pane->getLayerCount() - 1);
         if (layer) {
             m_document->removeLayerFromView(pane, layer);
         } else {