Skip to content

Commit

Permalink
fix: Reset the shortcut key search status when close the Settings dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
Kakueeen authored and deepin-mozart committed Oct 11, 2024
1 parent b06b0bc commit ef88ba2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/plugins/option/optioncore/mainframe/shortcutsettingwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,3 +640,13 @@ void ShortcutSettingWidget::saveConfig()
d->apply();
ActionManager::instance()->saveSettings();
}

void ShortcutSettingWidget::hideEvent(QHideEvent *e)
{
if (d->recordKeyBtn->isChecked()) {
d->recordKeyBtn->setChecked(false);
d->searchEdit->setPlaceholderText(tr("Type to search in keybindings"));
}
d->searchEdit->clearEdit();
PageWidget::hideEvent(e);
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ class ShortcutSettingWidget : public PageWidget
void readConfig() override;
void saveConfig() override;

protected:
void hideEvent(QHideEvent *e) override;

private:
ShortcutSettingWidgetPrivate *const d;
};
Expand Down

0 comments on commit ef88ba2

Please sign in to comment.