Skip to content

Commit

Permalink
(fix) Track property editor: don't close when opening context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Nov 24, 2024
1 parent 6f94fd0 commit 6202864
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/widget/wtrackproperty.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,13 @@ bool WTrackPropertyEditor::eventFilter(QObject* pObj, QEvent* pEvent) {
} else if (pEvent->type() == QEvent::FocusOut) {
// Close and commit if any other widget gets focus
if (isVisible()) {
hide();
emit commitEditorData(text());
QFocusEvent* fe = static_cast<QFocusEvent*>(pEvent);
// For any FocusOut, except when showing the QLineEdit's menu,
// we hide() and commit the current text.
if (fe->reason() != Qt::PopupFocusReason) {
hide();
emit commitEditorData(text());
}
}
}
return QLineEdit::eventFilter(pObj, pEvent);
Expand Down

0 comments on commit 6202864

Please sign in to comment.