diff --git a/src/gui/sharelinkwidget.cpp b/src/gui/sharelinkwidget.cpp index b316572a6..afd8692fe 100644 --- a/src/gui/sharelinkwidget.cpp +++ b/src/gui/sharelinkwidget.cpp @@ -173,12 +173,15 @@ void ShareLinkWidget::slotSharesFetched(const QList> &shar SharePermissions perm = _linkShare->getPermissions(); QActionGroup *permissionsGroup = new QActionGroup(this); + // Prepare sharing menu + _linkContextMenu = new QMenu(this); + // radio button style permissionsGroup->setExclusive(true); if(_isFile){ checked = perm & (SharePermissionRead & SharePermissionUpdate); - _allowEditingLinkAction = permissionsGroup->addAction(tr("Allow Editing")); + _allowEditingLinkAction = _linkContextMenu->addAction(tr("Allow Editing")); _allowEditingLinkAction->setCheckable(true); _allowEditingLinkAction->setChecked(checked); @@ -202,9 +205,6 @@ void ShareLinkWidget::slotSharesFetched(const QList> &shar _allowUploadLinkAction->setChecked(checked); } - // Prepare sharing menu - _linkContextMenu = new QMenu(this); - // Add copy action (icon only) _copyLinkAction = _linkContextMenu->addAction(QIcon(":/client/resources/copy.svg"), tr("Copy link"));