Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/danielhrisca/asammdf
Browse files Browse the repository at this point in the history
…into development
  • Loading branch information
tov101 committed Oct 11, 2023
2 parents 99d2401 + 01e4c0c commit ef0c98e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/asammdf/gui/widgets/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ def load_channel_list(self, event=None, file_name=None, manually=False):
if not info:
return
section, ok = QtWidgets.QInputDialog.getItem(
None,
self,
"Select section",
"Available sections:",
list(info),
Expand Down
5 changes: 2 additions & 3 deletions src/asammdf/gui/widgets/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def open_menu(self, position):
elif action.text() == "Set unit":
selected_items = self.selectedItems()

unit, ok = QtWidgets.QInputDialog.getText(None, "Set new unit", "Unit:")
unit, ok = QtWidgets.QInputDialog.getText(self, "Set new unit", "Unit:")

if ok:
selected_items = self.selectedItems()
Expand All @@ -313,7 +313,7 @@ def open_menu(self, position):
elif action.text() == "Set precision":
selected_items = self.selectedItems()

precision, ok = QtWidgets.QInputDialog.getInt(None, "Set new precision (float decimals)", "Precision:")
precision, ok = QtWidgets.QInputDialog.getInt(self, "Set new precision (float decimals)", "Precision:")

if ok and 0 <= precision <= 15:
for i in range(self.count()):
Expand Down Expand Up @@ -378,7 +378,6 @@ def open_menu(self, position):


class MinimalListWidget(QtWidgets.QListWidget):
itemsDeleted = QtCore.Signal(list)
itemsDeleted = QtCore.Signal(list)
itemsPasted = QtCore.Signal()

Expand Down
8 changes: 4 additions & 4 deletions src/asammdf/gui/widgets/mdi_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,7 @@ def _add_can_bus_trace_window(self, ranges=None):
w.layout().setSpacing(1)

def set_title(mdi):
name, ok = QtWidgets.QInputDialog.getText(None, "Set sub-plot title", "Title:")
name, ok = QtWidgets.QInputDialog.getText(self, "Set sub-plot title", "Title:")
if ok and name:
mdi.setWindowTitle(name)

Expand Down Expand Up @@ -1443,7 +1443,7 @@ def _add_flexray_bus_trace_window(self, ranges=None):
w.layout().setSpacing(1)

def set_title(mdi):
name, ok = QtWidgets.QInputDialog.getText(None, "Set sub-plot title", "Title:")
name, ok = QtWidgets.QInputDialog.getText(self, "Set sub-plot title", "Title:")
if ok and name:
mdi.setWindowTitle(name)

Expand Down Expand Up @@ -1494,7 +1494,7 @@ def _add_gps_window(self, signals):
w.layout().setSpacing(1)

def set_title(mdi):
name, ok = QtWidgets.QInputDialog.getText(None, "Set sub-plot title", "Title:")
name, ok = QtWidgets.QInputDialog.getText(self, "Set sub-plot title", "Title:")
if ok and name:
mdi.setWindowTitle(name)

Expand Down Expand Up @@ -1759,7 +1759,7 @@ def _add_lin_bus_trace_window(self, ranges=None):
w.layout().setSpacing(1)

def set_title(mdi):
name, ok = QtWidgets.QInputDialog.getText(None, "Set sub-plot title", "Title:")
name, ok = QtWidgets.QInputDialog.getText(self, "Set sub-plot title", "Title:")
if ok and name:
mdi.setWindowTitle(name)

Expand Down
4 changes: 2 additions & 2 deletions src/asammdf/gui/widgets/range_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def value2_changed(self, text):

def select_background_color(self, event=None):
color = self.background_color_btn.palette().button().color()
color = QtWidgets.QColorDialog.getColor(color)
color = QtWidgets.QColorDialog.getColor(color, self)
if color.isValid():
color = color.name()
self.background_color = color
Expand All @@ -96,7 +96,7 @@ def select_background_color(self, event=None):

def select_font_color(self, event=None):
color = self.font_color_btn.palette().button().color()
color = QtWidgets.QColorDialog.getColor(color)
color = QtWidgets.QColorDialog.getColor(color, self)
if color.isValid():
color = color.name()
self.font_color = color
Expand Down
4 changes: 2 additions & 2 deletions src/asammdf/gui/widgets/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ def keyPressEvent(self, event):
else:
color = QtGui.QColor("#ffffff")

color = QtWidgets.QColorDialog.getColor(color)
color = QtWidgets.QColorDialog.getColor(color, parent=self)
if color.isValid():
for item in selected_items:
if item.type() != item.Info:
Expand Down Expand Up @@ -1225,7 +1225,7 @@ def open_menu(self):
elif action_text == "Set unit":
selected_items = self.selectedItems()

unit, ok = QtWidgets.QInputDialog.getText(None, "Set new unit", "Unit:")
unit, ok = QtWidgets.QInputDialog.getText(self, "Set new unit", "Unit:")

if ok:
for item in selected_items:
Expand Down

0 comments on commit ef0c98e

Please sign in to comment.