use column 0 to retrieve the widget pointer
This commit is contained in:
parent
9e390cff8b
commit
c52bf250b6
|
@ -112,8 +112,9 @@ void DeviceWindow::selectionChanged(const QModelIndex ¤t, 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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user