bug fixes.

This commit is contained in:
St.Huang 2018-07-31 02:30:38 +08:00
parent d9da91e156
commit 4d255f8608
4 changed files with 8 additions and 0 deletions

View File

@ -51,6 +51,7 @@ def show_fm_dialog(browser = None):
if fm_dialog.exec_() == QDialog.Accepted:
# update local services
service_manager.update_services()
fm_dialog.destroy()
# reshow options window
show_options(browser)
@ -65,6 +66,7 @@ def show_options(browser = None, model_id = -1, callback = None, *args, **kwargs
if opt_dialog.exec_() == QDialog.Accepted:
if isinstance(callback, types.FunctionType):
callback(*args, **kwargs)
opt_dialog.destroy()
def show_about_dialog(parent):

View File

@ -142,6 +142,7 @@ class OptionsDialog(Dialog):
'''open setting dialog'''
dialog = SettingDialog(self, u'Setting')
dialog.exec_()
dialog.destroy()
def check_updates(self):
'''check addon version'''
@ -153,6 +154,7 @@ class OptionsDialog(Dialog):
from .common import show_fm_dialog
self.save()
self.close()
self.destroy()
show_fm_dialog(self._parent)
def show_about(self):

View File

@ -51,6 +51,7 @@ def show_fm_dialog(browser = None):
if fm_dialog.exec_() == QDialog.Accepted:
# update local services
service_manager.update_services()
fm_dialog.destroy()
# reshow options window
show_options(browser)
@ -65,6 +66,7 @@ def show_options(browser = None, model_id = -1, callback = None, *args, **kwargs
if opt_dialog.exec_() == QDialog.Accepted:
if isinstance(callback, types.FunctionType):
callback(*args, **kwargs)
opt_dialog.destroy()
def show_about_dialog(parent):

View File

@ -142,6 +142,7 @@ class OptionsDialog(Dialog):
'''open setting dialog'''
dialog = SettingDialog(self, u'Setting')
dialog.exec_()
dialog.destroy()
def check_updates(self):
'''check addon version'''
@ -153,6 +154,7 @@ class OptionsDialog(Dialog):
from .common import show_fm_dialog
self.save()
self.close()
self.destroy()
show_fm_dialog(self._parent)
def show_about(self):