Commit 80e4d258 authored by Dan Pascu's avatar Dan Pascu

Ignore hold/hangup keyboard shortcuts if no session is selected

parent 314bd75d
...@@ -2595,12 +2595,16 @@ class AudioSessionListView(QListView): ...@@ -2595,12 +2595,16 @@ class AudioSessionListView(QListView):
session.widget.drop_indicator = True session.widget.drop_indicator = True
def _SH_HangupShortcutActivated(self): def _SH_HangupShortcutActivated(self):
session = self.selectedIndexes()[0].data(Qt.UserRole) selected_indexes = self.selectedIndexes()
if selected_indexes:
session = selected_indexes[0].data(Qt.UserRole)
if session.client_conference is None: if session.client_conference is None:
session.widget.hangup_button.click() session.widget.hangup_button.click()
def _SH_HoldShortcutActivated(self): def _SH_HoldShortcutActivated(self):
session = self.selectedIndexes()[0].data(Qt.UserRole) selected_indexes = self.selectedIndexes()
if selected_indexes:
session = selected_indexes[0].data(Qt.UserRole)
if session.client_conference is None: if session.client_conference is None:
session.widget.hold_button.click() session.widget.hold_button.click()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment