Skip to content

Commit

Permalink
clear additional shortcut field when necessary (#3408)
Browse files Browse the repository at this point in the history
* clear additional shortcut field

* Update CHANGELOG.md
  • Loading branch information
octaeder authored Dec 8, 2023
1 parent d6ee2b3 commit 2982d39
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/configdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,10 @@ void ShortcutDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
if (UtilsUi::txsConfirmWarning(QString(ConfigDialog::tr("The shortcut <%1> is already assigned to the command:")).arg(value) + "\n" + duplicate + "\n\n" + ConfigDialog::tr("Do you wish to remove the old assignment and bind the shortcut to the new command?"))) {
//model->setData(mil[0],"",Qt::DisplayRole);
foreach (QTreeWidgetItem *twi, li) {
if (twi && twi->text(2) == value) twi->setText(2, "");
if (twi) {
if (twi->text(2) == value) twi->setText(2, "");
else if (twi->text(3) == value) twi->setText(3, "");
}
}
} else {
return;
Expand Down
3 changes: 2 additions & 1 deletion utilities/manual/source/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# CHANGELOG

## TeXstudio 4.7.2

-
- fix duplicate shortcut in 'Additional Shortcut' column is not removed [#3408](https://github.com/texstudio-org/texstudio/pull/3408)

## TeXstudio 4.7.1

Expand Down

0 comments on commit 2982d39

Please sign in to comment.