Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

updated remove shortcut works, added focus when item selected

Jeremy Bullock7f493cca08a6
diff --git a/toonz/sources/toonz/shortcutpopup.cpp b/toonz/sources/toonz/shortcutpopup.cpp
index 575093b59..3d0ada32d 100644
--- a/toonz/sources/toonz/shortcutpopup.cpp
+++ b/toonz/sources/toonz/shortcutpopup.cpp
@@ -49,8 +49,10 @@ public:
text.remove("&");
setText(0, text);
QString shortcut = m_action->shortcut().toString();
- if (shortcut != "")
- setText(1, shortcut);
+ if (shortcut != "")
+ setText(1, shortcut);
+ else
+ setText(1, "");
}
QAction *getAction() const { return m_action; }
};
@@ -90,6 +92,7 @@ void ShortcutViewer::paintEvent(QPaintEvent *) {
void ShortcutViewer::setAction(QAction *action) {
m_action = action;
update();
+ setFocus();
}
//-----------------------------------------------------------------------------
@@ -171,7 +174,6 @@ void ShortcutViewer::enterEvent(QEvent *event) {
//-----------------------------------------------------------------------------
void ShortcutViewer::leaveEvent(QEvent *event) {
- clearFocus();
update();
}