Skip to content

Commit

Permalink
Merge pull request #13930 from ronso0/track-prop-edi-menu-fix
Browse files Browse the repository at this point in the history
(fix) Track property editor: don't close when opening context menu
  • Loading branch information
daschuer authored Nov 26, 2024
2 parents 452263d + 6202864 commit 9553d51
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 9553d51

Please sign in to comment.