Skip to content

Commit

Permalink
ui: open the general help link whenever no protocol is selected in th…
Browse files Browse the repository at this point in the history
…e device dialog

fixes #1653
  • Loading branch information
jcelerier committed Jan 8, 2025
1 parent 1750393 commit 093f648
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,13 @@ DeviceEditDialog::DeviceEditDialog(
connect(m_buttonBox, &QDialogButtonBox::helpRequested, [this] {
if(!this->m_protocols)
return;
auto selected_item = m_protocols->selectedItems().first();
auto items = m_protocols->selectedItems();
if(items.empty())
{
QDesktopServices::openUrl(QUrl("https://ossia.io/score-docs/devices.html"));
return;
}
auto selected_item = items.first();
auto key
= selected_item->data(0, Qt::UserRole).value<UuidKey<Device::ProtocolFactory>>();
if(key == UuidKey<Device::ProtocolFactory>{})
Expand Down

0 comments on commit 093f648

Please sign in to comment.