From 1b745599c756948372e9ced9c23965298092d5f5 Mon Sep 17 00:00:00 2001 From: mjbudd77 Date: Sat, 17 Jul 2021 15:08:33 -0400 Subject: [PATCH] Minor logic fixes for transitions between debugger layout presets. --- src/drivers/Qt/ConsoleDebugger.cpp | 16 ++++++++++++++++ src/drivers/Qt/ConsoleDebugger.h | 2 -- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/drivers/Qt/ConsoleDebugger.cpp b/src/drivers/Qt/ConsoleDebugger.cpp index 7d809ae7..1ccc1406 100644 --- a/src/drivers/Qt/ConsoleDebugger.cpp +++ b/src/drivers/Qt/ConsoleDebugger.cpp @@ -2640,6 +2640,14 @@ void ConsoleDebugger::setLayoutOption( int opt ) s[3] = 0; vsplitter[0]->setSizes(s); + + s = mainLayouth->sizes(); + + if ( s[2] == 0 ) + { + s[0] = s[1] = s[2] = mainLayouth->width() / 3; + mainLayouth->setSizes(s); + } } break; case 4: @@ -2663,6 +2671,14 @@ void ConsoleDebugger::setLayoutOption( int opt ) vsplitter[0]->setSizes(s); vsplitter[1]->setSizes(s); + + s = mainLayouth->sizes(); + + if ( s[2] == 0 ) + { + s[0] = s[1] = s[2] = mainLayouth->width() / 3; + mainLayouth->setSizes(s); + } } break; } diff --git a/src/drivers/Qt/ConsoleDebugger.h b/src/drivers/Qt/ConsoleDebugger.h index 8cd7dcac..3ea62b28 100644 --- a/src/drivers/Qt/ConsoleDebugger.h +++ b/src/drivers/Qt/ConsoleDebugger.h @@ -446,8 +446,6 @@ class ConsoleDebugger : public QDialog QLabel *pixLbl; QLabel *cpuCyclesLbl1; QLabel *cpuInstrsLbl1; - //QLabel *bpTreeHideLbl; - //QLabel *bmTreeHideLbl; QTimer *periodicTimer; QFont font;