diff --git a/src/framework/uicomponents/qml/Muse/UiComponents/selectableitemlistmodel.cpp b/src/framework/uicomponents/qml/Muse/UiComponents/selectableitemlistmodel.cpp index 4cc842f0f4247..d93be1b07dc59 100644 --- a/src/framework/uicomponents/qml/Muse/UiComponents/selectableitemlistmodel.cpp +++ b/src/framework/uicomponents/qml/Muse/UiComponents/selectableitemlistmodel.cpp @@ -35,6 +35,10 @@ SelectableItemListModel::SelectableItemListModel(QObject* parent) : QAbstractListModel(parent), m_selection(new ItemMultiSelectionModel(this)) { connect(m_selection, &ItemMultiSelectionModel::selectionChanged, [this]() { + if (rowCount() > 0) { + emit dataChanged(index(0), index(rowCount() - 1), { RoleIsSelected }); + } + emit selectionChanged(); onUpdateOperationsAvailability(); }); @@ -88,8 +92,6 @@ void SelectableItemListModel::selectRow(int row) TRACEFUNC; m_selection->select(index(row)); - - emit dataChanged(index(0), index(rowCount() - 1), { RoleIsSelected }); } void SelectableItemListModel::moveSelectionUp()