GH-4164 Assign instances to groups using drag & drop

This commit is contained in:
Petr Mrázek
2021-10-25 23:51:42 +02:00
parent 85ecbad467
commit ae4939e0d2
21 changed files with 345 additions and 334 deletions

View File

@@ -22,7 +22,7 @@
#include "IconPickerDialog.h"
#include "ui_IconPickerDialog.h"
#include "groupview/InstanceDelegate.h"
#include "instanceview/InstanceDelegate.h"
#include "icons/IconList.h"
#include "icons/IconUtils.h"
@@ -126,8 +126,9 @@ void IconPickerDialog::selectionChanged(QItemSelection selected, QItemSelection
return;
QString key = selected.first().indexes().first().data(Qt::UserRole).toString();
if (!key.isEmpty())
if (!key.isEmpty()) {
selectedIconKey = key;
}
}
int IconPickerDialog::execWithSelection(QString selection)
@@ -141,8 +142,7 @@ int IconPickerDialog::execWithSelection(QString selection)
contentsWidget->selectionModel()->select(
model_index, QItemSelectionModel::Current | QItemSelectionModel::Select);
QMetaObject::invokeMethod(this, "delayed_scroll", Qt::QueuedConnection,
Q_ARG(QModelIndex, model_index));
QMetaObject::invokeMethod(this, "delayed_scroll", Qt::QueuedConnection, Q_ARG(QModelIndex, model_index));
return QDialog::exec();
}