PropertyEditor: Fix tab toggling bool (#26955)

This commit is contained in:
PaddleStroke
2026-01-19 18:10:11 +01:00
committed by GitHub
parent 0a8392e995
commit a49edadde2

View File

@@ -202,12 +202,14 @@ bool PropertyItemDelegate::eventFilter(QObject* o, QEvent* ev)
if (checkBox) {
auto parentEditor = qobject_cast<PropertyEditor*>(this->parent());
if (parentEditor && parentEditor->activeEditor == checkBox) {
if (this->pressed) {
checkBox->toggle();
// Delay valueChanged to ensure proper recomputation
QTimer::singleShot(0, this, [this]() { valueChanged(); });
}
}
}
}
else if (ev->type() == QEvent::FocusOut) {
if (auto button = qobject_cast<Gui::ColorButton*>(o)) {
// Ignore the event if the ColorButton's modal dialog is active.