From 932c0db65e54d24cbc9131e00412a7f0a8f2bcd2 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 6 Oct 2024 17:00:07 -0400 Subject: Reduce variable scopes --- src/gui/ConnectWindow.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src/gui/ConnectWindow.cpp') diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp index b33c3b81..3c9f7e89 100644 --- a/src/gui/ConnectWindow.cpp +++ b/src/gui/ConnectWindow.cpp @@ -440,18 +440,17 @@ ConnectWindow::internal_toggled() void ConnectWindow::next_stage() { - static const char* labels[] = { - "Connecting...", - "Pinging engine...", - "Attaching to engine...", - "Requesting root graph...", - "Waiting for root graph...", - "Connected" - }; - - ++_connect_stage; if (_widgets_loaded) { + static const char* labels[] = { + "Connecting...", + "Pinging engine...", + "Attaching to engine...", + "Requesting root graph...", + "Waiting for root graph...", + "Connected" + }; + _progress_label->set_text(labels[_connect_stage]); } } -- cgit v1.2.1