Commit ba242bba authored by Luci Stanescu's avatar Luci Stanescu

Fixed sending DTMF digits when a conference is active

parent f4ed5d83
...@@ -1249,11 +1249,11 @@ class SessionListView(QListView): ...@@ -1249,11 +1249,11 @@ class SessionListView(QListView):
def keyPressEvent(self, event): def keyPressEvent(self, event):
digit = chr(event.key()) if event.key() < 256 else None digit = chr(event.key()) if event.key() < 256 else None
selection_model = self.selectionModel() if digit is not None and digit in '0123456789ABCD#*':
selected_indexes = selection_model.selectedIndexes() for session in (s for s in self.model().sessions if s.active):
if digit is not None and digit in '0123456789ABCD#*' and selected_indexes: session.send_dtmf(digit)
self.model().data(selected_indexes[0]).send_dtmf(digit)
elif event.key() in (Qt.Key_Up, Qt.Key_Down): elif event.key() in (Qt.Key_Up, Qt.Key_Down):
selection_model = self.selectionModel()
current_index = selection_model.currentIndex() current_index = selection_model.currentIndex()
if current_index.isValid(): if current_index.isValid():
step = 1 if event.key() == Qt.Key_Down else -1 step = 1 if event.key() == Qt.Key_Down else -1
......
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