Fix tests and add GUI refresh
This commit is contained in:
@@ -280,12 +280,14 @@ class SharedData(QObject):
|
|||||||
"""Update the value for the main progress bar."""
|
"""Update the value for the main progress bar."""
|
||||||
if gui := self._gui:
|
if gui := self._gui:
|
||||||
gui.mainProgress.setValue(value)
|
gui.mainProgress.setValue(value)
|
||||||
|
QApplication.processEvents()
|
||||||
return
|
return
|
||||||
|
|
||||||
def incMainProgress(self) -> None:
|
def incMainProgress(self) -> None:
|
||||||
"""Increment the value for the main progress bar."""
|
"""Increment the value for the main progress bar."""
|
||||||
if gui := self._gui:
|
if gui := self._gui:
|
||||||
gui.mainProgress.setValue(gui.mainProgress.value() + 1)
|
gui.mainProgress.setValue(gui.mainProgress.value() + 1)
|
||||||
|
QApplication.processEvents()
|
||||||
return
|
return
|
||||||
|
|
||||||
def clearMainProgress(self, delay: float = 1.0) -> None:
|
def clearMainProgress(self, delay: float = 1.0) -> None:
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ class MockGuiMain(QWidget):
|
|||||||
self.mainStatus = MagicMock()
|
self.mainStatus = MagicMock()
|
||||||
self.docEditor = MagicMock()
|
self.docEditor = MagicMock()
|
||||||
self.docViewer = MagicMock()
|
self.docViewer = MagicMock()
|
||||||
|
self.mainProgress = MagicMock()
|
||||||
self.projPath = ""
|
self.projPath = ""
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user