1
0
Fork 0

use column 0 to retrieve the widget pointer

This commit is contained in:
Kevin Matz 2023-04-17 09:30:13 -04:00
parent 9e390cff8b
commit c52bf250b6
1 changed files with 2 additions and 1 deletions

View File

@ -112,8 +112,9 @@ void DeviceWindow::selectionChanged(const QModelIndex &current, const QModelInde
bool hasrdm = false;
if (current.isValid())
{
auto index = model->index(current.row(), 0, current.parent());
auto wdgt = index.data(Qt::EditRole).value<std::shared_ptr<DmxWidget>>();
valid = true;
auto wdgt = current.data(Qt::EditRole).value<std::shared_ptr<DmxWidget>>();
connected = wdgt->isConnected();
hasdmx = connected & wdgt->featureDMX();
hasrdm = connected & wdgt->featureRDM();