From a5c9cd9bd7bcc71a893bd73d71a9fc4b931a9f02 Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 2 May 2017 16:13:44 +0100 Subject: [PATCH] Added an extra check to the previous commit to make sure that the showBuildTab command is only invoked if the build tab is not already showing to prevent the command being constantly re-triggered when continuously recompiling --- .../Source/LiveBuildEngine/projucer_CompileEngineClient.cpp | 4 ++-- .../Projucer/Source/Project/jucer_ProjectContentComponent.h | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineClient.cpp b/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineClient.cpp index 320da9f26d..88826ef5ca 100644 --- a/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineClient.cpp +++ b/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineClient.cpp @@ -844,10 +844,10 @@ void CompileEngineChildProcess::handleClassListChanged (const ValueTree& newList void CompileEngineChildProcess::handleBuildFailed() { - // check that the command will be processed auto* mcm = ModalComponentManager::getInstance(); + auto* pcc = findProjectContentComponent(); - if (mcm->getNumModalComponents() != 0 || findProjectContentComponent() == nullptr) + if (mcm->getNumModalComponents() > 0 || pcc == nullptr || pcc->getCurrentTabIndex() == 1) return; if (errorList.getNumErrors() > 0) diff --git a/extras/Projucer/Source/Project/jucer_ProjectContentComponent.h b/extras/Projucer/Source/Project/jucer_ProjectContentComponent.h index 3680a563c7..f4e0d7d05e 100644 --- a/extras/Projucer/Source/Project/jucer_ProjectContentComponent.h +++ b/extras/Projucer/Source/Project/jucer_ProjectContentComponent.h @@ -80,8 +80,9 @@ public: void openInSelectedIDE (bool saveFirst); void showNewExporterMenu(); - void showProjectTab() { sidebarTabs.setCurrentTabIndex (0); } - void showBuildTab() { sidebarTabs.setCurrentTabIndex (1); } + void showProjectTab() { sidebarTabs.setCurrentTabIndex (0); } + void showBuildTab() { sidebarTabs.setCurrentTabIndex (1); } + int getCurrentTabIndex() { return sidebarTabs.getCurrentTabIndex(); } void showFilesPanel() { showProjectPanel (0); } void showModulesPanel() { showProjectPanel (1); }