mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-13 05:37:42 +02:00
NOISSUE fix bug with drag & drop not working with empty mod list
This commit is contained in:
@ -337,13 +337,14 @@ Qt::ItemFlags SimpleModList::flags(const QModelIndex &index) const
|
|||||||
{
|
{
|
||||||
Qt::ItemFlags defaultFlags = QAbstractListModel::flags(index);
|
Qt::ItemFlags defaultFlags = QAbstractListModel::flags(index);
|
||||||
auto flags = defaultFlags;
|
auto flags = defaultFlags;
|
||||||
if(index.isValid()) {
|
if(interaction_disabled) {
|
||||||
if(interaction_disabled) {
|
flags &= ~Qt::ItemIsDropEnabled;
|
||||||
flags &= ~Qt::ItemIsDropEnabled;
|
}
|
||||||
flags &= ~Qt::ItemIsUserCheckable;
|
else
|
||||||
} else {
|
{
|
||||||
|
flags |= Qt::ItemIsDropEnabled;
|
||||||
|
if(index.isValid()) {
|
||||||
flags |= Qt::ItemIsUserCheckable;
|
flags |= Qt::ItemIsUserCheckable;
|
||||||
flags |= Qt::ItemIsDropEnabled;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return flags;
|
return flags;
|
||||||
|
Reference in New Issue
Block a user