mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-12-25 15:16:02 +00:00
NOISSUE fix bug with drag & drop not working with empty mod list
This commit is contained in:
parent
bd93c3b4e0
commit
bafcf93eb1
@ -337,13 +337,14 @@ Qt::ItemFlags SimpleModList::flags(const QModelIndex &index) const
|
||||
{
|
||||
Qt::ItemFlags defaultFlags = QAbstractListModel::flags(index);
|
||||
auto flags = defaultFlags;
|
||||
if(index.isValid()) {
|
||||
if(interaction_disabled) {
|
||||
flags &= ~Qt::ItemIsDropEnabled;
|
||||
flags &= ~Qt::ItemIsUserCheckable;
|
||||
} else {
|
||||
if(interaction_disabled) {
|
||||
flags &= ~Qt::ItemIsDropEnabled;
|
||||
}
|
||||
else
|
||||
{
|
||||
flags |= Qt::ItemIsDropEnabled;
|
||||
if(index.isValid()) {
|
||||
flags |= Qt::ItemIsUserCheckable;
|
||||
flags |= Qt::ItemIsDropEnabled;
|
||||
}
|
||||
}
|
||||
return flags;
|
||||
|
Loading…
Reference in New Issue
Block a user