mirror of
https://github.com/rbreu/beeref.git
synced 2026-03-11 08:54:28 +00:00
Fix lingering progress bar
This commit is contained in:
parent
679248380c
commit
3ddb338cd1
3 changed files with 8 additions and 2 deletions
|
|
@ -22,7 +22,7 @@ import sys
|
|||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from beeref.assets import BeeAssets
|
||||
from beeref.config import CommandlineArgs
|
||||
from beeref.config import CommandlineArgs, BeeSettings, logfile_name
|
||||
from beeref import constants
|
||||
from beeref.view import BeeGraphicsView
|
||||
|
||||
|
|
@ -77,8 +77,12 @@ sys.excepthook = handle_uncaught_exception
|
|||
|
||||
def main():
|
||||
logger.info(f'Starting {constants.APPNAME} version {constants.VERSION}')
|
||||
settings = BeeSettings()
|
||||
logger.info(f'Using settings: {settings.fileName()}')
|
||||
logger.info(f'Logging to: {logfile_name}')
|
||||
CommandlineArgs(with_check=True) # Force checking
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
|
||||
bee = BeeRefMainWindow(app) # NOQA:F841
|
||||
|
||||
signal.signal(signal.SIGINT, handle_sigint)
|
||||
|
|
|
|||
|
|
@ -106,7 +106,6 @@ class BeeSettings(QtCore.QSettings):
|
|||
settings_scope,
|
||||
constants.APPNAME,
|
||||
constants.APPNAME)
|
||||
logger.info(f'Using settings: {self.fileName()}')
|
||||
|
||||
def get_settings_dir(self): # pragma: no cover
|
||||
args = CommandlineArgs()
|
||||
|
|
|
|||
|
|
@ -276,6 +276,7 @@ class BeeGraphicsView(QtWidgets.QGraphicsView, ActionsMixin):
|
|||
else:
|
||||
self.scene.add_queued_items()
|
||||
self.on_action_fit_scene()
|
||||
self.progress.deleteLater()
|
||||
|
||||
def open_from_file(self, filename):
|
||||
logger.info(f'Opening file {filename}')
|
||||
|
|
@ -309,6 +310,7 @@ class BeeGraphicsView(QtWidgets.QGraphicsView, ActionsMixin):
|
|||
'Problem saving file',
|
||||
('<p>Problem saving file %s</p>'
|
||||
'<p>File/directory not accessible</p>') % filename)
|
||||
self.progress.deleteLater()
|
||||
|
||||
def do_save(self, filename, create_new):
|
||||
if not filename.endswith('.bee'):
|
||||
|
|
@ -372,6 +374,7 @@ class BeeGraphicsView(QtWidgets.QGraphicsView, ActionsMixin):
|
|||
self.scene.add_queued_items()
|
||||
self.scene.arrange_optimal()
|
||||
self.undo_stack.endMacro()
|
||||
self.progress.deleteLater()
|
||||
|
||||
def do_insert_images(self, filenames, pos=None):
|
||||
if not pos:
|
||||
|
|
|
|||
Loading…
Reference in a new issue