diff --git a/src/Gui/propertyeditor/PropertyEditor.cpp b/src/Gui/propertyeditor/PropertyEditor.cpp index 9cade63ee5..6daf4f734a 100644 --- a/src/Gui/propertyeditor/PropertyEditor.cpp +++ b/src/Gui/propertyeditor/PropertyEditor.cpp @@ -153,7 +153,6 @@ void PropertyEditor::commitData (QWidget * editor) void PropertyEditor::editorDestroyed (QObject * editor) { - delegate->editorClosed(0,QAbstractItemDelegate::NoHint); QTreeView::editorDestroyed(editor); } diff --git a/src/Gui/propertyeditor/PropertyItemDelegate.cpp b/src/Gui/propertyeditor/PropertyItemDelegate.cpp index 562c4d9750..46af8cc376 100644 --- a/src/Gui/propertyeditor/PropertyItemDelegate.cpp +++ b/src/Gui/propertyeditor/PropertyItemDelegate.cpp @@ -47,8 +47,6 @@ PropertyItemDelegate::PropertyItemDelegate(QObject* parent) : QItemDelegate(parent), expressionEditor(0) , pressed(false), changed(false) { - connect(this, SIGNAL(closeEditor(QWidget*, QAbstractItemDelegate::EndEditHint)), - this, SLOT(editorClosed(QWidget*, QAbstractItemDelegate::EndEditHint))); } PropertyItemDelegate::~PropertyItemDelegate() @@ -123,26 +121,6 @@ bool PropertyItemDelegate::editorEvent (QEvent * event, QAbstractItemModel* mode return QItemDelegate::editorEvent(event, model, option, index); } -void PropertyItemDelegate::editorClosed(QWidget *editor, QAbstractItemDelegate::EndEditHint hint) -{ -#if 0 - int id = 0; - auto &app = App::GetApplication(); - const char *name = app.getActiveTransaction(&id); - if(id && id==activeTransactionID) { - FC_LOG("editor close transaction " << name); - app.closeActiveTransaction(false,id); - activeTransactionID = 0; - } - FC_LOG("editor close " << editor); -#endif - - // don't close the editor when pressing Tab or Shift+Tab - // https://forum.freecadweb.org/viewtopic.php?f=3&t=34627#p290957 - if (editor && hint != EditNextItem && hint != EditPreviousItem) - editor->close(); -} - QWidget * PropertyItemDelegate::createEditor (QWidget * parent, const QStyleOptionViewItem & /*option*/, const QModelIndex & index ) const { diff --git a/src/Gui/propertyeditor/PropertyItemDelegate.h b/src/Gui/propertyeditor/PropertyItemDelegate.h index 96c24a3c89..f2ae422954 100644 --- a/src/Gui/propertyeditor/PropertyItemDelegate.h +++ b/src/Gui/propertyeditor/PropertyItemDelegate.h @@ -47,7 +47,6 @@ public: public Q_SLOTS: void valueChanged(); - void editorClosed (QWidget * editor, QAbstractItemDelegate::EndEditHint hint); private: mutable QWidget *expressionEditor;