Fix errors copy rows from search results
This commit is contained in:
parent
bf438c3d99
commit
60c085ad12
@ -526,11 +526,20 @@ class PlaylistTab(QTableView):
|
|||||||
return self.data_model.get_row_track_path(model_row_number)
|
return self.data_model.get_row_track_path(model_row_number)
|
||||||
|
|
||||||
def get_selected_rows(self) -> List[int]:
|
def get_selected_rows(self) -> List[int]:
|
||||||
"""Return a list of selected row numbers sorted by row"""
|
"""Return a list of model-selected row numbers sorted by row"""
|
||||||
|
|
||||||
# Use a set to deduplicate result (a selected row will have all
|
# Use a set to deduplicate result (a selected row will have all
|
||||||
# items in that row selected)
|
# items in that row selected)
|
||||||
return sorted(list(set([a.row() for a in self.selectedIndexes()])))
|
return sorted(
|
||||||
|
list(
|
||||||
|
set(
|
||||||
|
[
|
||||||
|
self.proxy_model.mapToSource(a).row()
|
||||||
|
for a in self.selectedIndexes()
|
||||||
|
]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
def _info_row(self, row_number: int) -> None:
|
def _info_row(self, row_number: int) -> None:
|
||||||
"""Display popup with info re row"""
|
"""Display popup with info re row"""
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user