Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
matrss committed Mar 21, 2024
1 parent 6e4ed44 commit f609975
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions mslib/msui/mscolab.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ def __init__(self, parent=None, data_dir=None):
self.ui.serverOptionsCb.currentIndexChanged.connect(self.server_options_handler)

# set up user menu and add to toolbutton
self.user_menu = QtWidgets.QMenu()
self.user_menu = QtWidgets.QMenu(self.ui)
self.profile_action = self.user_menu.addAction("Profile", self.open_profile_window)
self.user_menu.addSeparator()
self.logout_action = self.user_menu.addAction("Logout", self.logout)
Expand Down Expand Up @@ -790,7 +790,7 @@ def open_profile_window(self):
def on_context_menu(point):
self.gravatar_menu.exec_(self.profile_dialog.gravatarLabel.mapToGlobal(point))

self.prof_diag = QtWidgets.QDialog()
self.prof_diag = QtWidgets.QDialog(self.ui)
self.profile_dialog = ui_profile.Ui_ProfileWindow()
self.profile_dialog.setupUi(self.prof_diag)
self.profile_dialog.buttonBox.accepted.connect(lambda: self.prof_diag.close())
Expand All @@ -800,7 +800,7 @@ def on_context_menu(point):
self.profile_dialog.deleteAccountBtn.clicked.connect(self.delete_account)

# add context menu for right click on image
self.gravatar_menu = QtWidgets.QMenu()
self.gravatar_menu = QtWidgets.QMenu(self.ui)
self.gravatar_menu.addAction('Fetch Gravatar', lambda: self.fetch_gravatar(refresh=True))
self.gravatar_menu.addAction('Remove Gravatar', lambda: self.remove_gravatar())
self.profile_dialog.gravatarLabel.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
Expand Down Expand Up @@ -870,7 +870,7 @@ def browse():
self.add_proj_dialog.f_content = file_content
self.add_proj_dialog.selectedFile.setText(file_name)

self.proj_diag = QtWidgets.QDialog()
self.proj_diag = QtWidgets.QDialog(self.ui)
self.add_proj_dialog = add_operation_ui.Ui_addOperationDialog()
self.add_proj_dialog.setupUi(self.proj_diag)
self.add_proj_dialog.f_content = None
Expand Down
4 changes: 2 additions & 2 deletions mslib/msui/wms_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,13 +512,13 @@ def __init__(self, parent=None, default_WMS=None, wms_cache=None, view=None):

# Progress dialog to inform the user about image ongoing retrievals.
self.pdlg = QtWidgets.QProgressDialog(
"retrieving image...", "Cancel", 0, 10, parent=self.parent())
"retrieving image...", "Cancel", 0, 10, parent=self)
self.pdlg.close()

# Progress dialog to inform the user about ongoing capability requests.
self.capabilities_worker = Worker(None)
self.cpdlg = QtWidgets.QProgressDialog(
"retrieving wms capabilities...", "Cancel", 0, 10, parent=self.multilayers)
"retrieving wms capabilities...", "Cancel", 0, 10, parent=self)
self.cpdlg.canceled.connect(self.stop_capabilities_retrieval)
self.cpdlg.close()

Expand Down
2 changes: 1 addition & 1 deletion mslib/support/qt_json_view/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(self, parent=None):

def _menu(self, position):
"""Show the actions of the DataType (if any)."""
menu = QtWidgets.QMenu()
menu = QtWidgets.QMenu(self)
index = self.indexAt(position)
data = index.data(TypeRole)
if data is None:
Expand Down

0 comments on commit f609975

Please sign in to comment.