From c697009f2486c22e431f399e8f97e071b78e38c0 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Mon, 14 Mar 2016 09:33:45 -0400 Subject: [PATCH] (DomainTransition|InfoFlow)AnalysisTab: add busy indicator when GUI could be unresponsive Bring in line with other tabs. --- setoolsgui/apol/dta.py | 6 ++++-- setoolsgui/apol/infoflow.py | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/setoolsgui/apol/dta.py b/setoolsgui/apol/dta.py index 080a893..afcc5f9 100644 --- a/setoolsgui/apol/dta.py +++ b/setoolsgui/apol/dta.py @@ -229,8 +229,10 @@ class DomainTransitionAnalysisTab(SEToolsWidget, QScrollArea): self.thread.start() def update_complete(self): - # update location of result display - self.raw_results.moveCursor(QTextCursor.Start) + if not self.busy.wasCanceled(): + self.busy.setLabelText("Moving the raw result to top; GUI may be unresponsive") + self.busy.repaint() + self.raw_results.moveCursor(QTextCursor.Start) self.busy.reset() diff --git a/setoolsgui/apol/infoflow.py b/setoolsgui/apol/infoflow.py index 754c16d..0e9e955 100644 --- a/setoolsgui/apol/infoflow.py +++ b/setoolsgui/apol/infoflow.py @@ -215,8 +215,10 @@ class InfoFlowAnalysisTab(SEToolsWidget, QScrollArea): self.thread.start() def update_complete(self): - # update location of result display - self.raw_results.moveCursor(QTextCursor.Start) + if not self.busy.wasCanceled(): + self.busy.setLabelText("Moving the raw result to top; GUI may be unresponsive") + self.busy.repaint() + self.raw_results.moveCursor(QTextCursor.Start) self.busy.reset()