Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for F11/FullScreen bug & clear stats info after deleting all channels on plot #969

Merged
merged 10 commits into from
Dec 20, 2023
3 changes: 2 additions & 1 deletion src/asammdf/gui/widgets/channel_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def __init__(self, xunit="s", precision=6, *args, **kwargs):

def set_stats(self, stats):
if not stats:
self.clear()
return

self._stats = deepcopy(stats)
Expand Down Expand Up @@ -113,7 +114,7 @@ def clear(self):
for k, group in enumerate(
(
self.cursor_group,
self.range_group,
self.region_group,
self.visible_group,
self.overall_group,
)
Expand Down
4 changes: 4 additions & 0 deletions src/asammdf/gui/widgets/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1253,6 +1253,10 @@ def closeEvent(self, event):
count = self.files.count()
for i in range(count):
self.files.widget(i).close()
if self.fullscreen:
widget, index = self.fullscreen
widget.close()
widget.deleteLater()
event.accept()

def dragEnterEvent(self, e):
Expand Down
1 change: 1 addition & 0 deletions src/asammdf/gui/widgets/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2305,6 +2305,7 @@ def channel_selection_reduced(self, deleted):

if not count:
self.info_uuid = None
self.info.set_stats(None)
self.selected_channel_value.setText("")
self.close_request.emit()

Expand Down
Loading