Merge pull request #620 from turtletooth/shortcutwindow
Fixed remove shortcut not updating, added focus when item selected
This commit is contained in:
commit
b2a562cb68
1 changed files with 2 additions and 3 deletions
|
@ -49,8 +49,7 @@ public:
|
|||
text.remove("&");
|
||||
setText(0, text);
|
||||
QString shortcut = m_action->shortcut().toString();
|
||||
if (shortcut != "")
|
||||
setText(1, shortcut);
|
||||
setText(1, shortcut);
|
||||
}
|
||||
QAction *getAction() const { return m_action; }
|
||||
};
|
||||
|
@ -90,6 +89,7 @@ void ShortcutViewer::paintEvent(QPaintEvent *) {
|
|||
void ShortcutViewer::setAction(QAction *action) {
|
||||
m_action = action;
|
||||
update();
|
||||
setFocus();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -171,7 +171,6 @@ void ShortcutViewer::enterEvent(QEvent *event) {
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
void ShortcutViewer::leaveEvent(QEvent *event) {
|
||||
clearFocus();
|
||||
update();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue