Gui: property editor do not enter edit mode if the property is read-only

This commit is contained in:
Alfredo Monclus
2025-05-25 06:25:09 -06:00
parent 4713e4b854
commit 012a765614
2 changed files with 2 additions and 25 deletions

View File

@@ -147,18 +147,15 @@ QWidget * PropertyItemDelegate::createEditor (QWidget * parent, const QStyleOpti
return nullptr;
auto childItem = static_cast<PropertyItem*>(index.internalPointer());
if (!childItem)
if (!childItem || childItem->isSeparator() || childItem->isReadOnly()) {
return nullptr;
}
auto parentEditor = qobject_cast<PropertyEditor*>(this->parent());
if(parentEditor)
parentEditor->closeEditor();
if (childItem->isSeparator())
return nullptr;
FC_LOG("create editor " << index.row() << "," << index.column());
QWidget* editor = nullptr;
expressionEditor = nullptr;
userEditor = nullptr;