From 00b3aa5cfa4d0842c0191246015d5733f0eba24e Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 16 Dec 2019 14:41:03 +0100 Subject: [PATCH] SpreadSheet: [skip ci] fix crash when changing data inside a spread sheet --- src/Mod/Spreadsheet/Gui/SpreadsheetDelegate.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Mod/Spreadsheet/Gui/SpreadsheetDelegate.cpp b/src/Mod/Spreadsheet/Gui/SpreadsheetDelegate.cpp index b0d2a04bb0..a202d2d8bd 100644 --- a/src/Mod/Spreadsheet/Gui/SpreadsheetDelegate.cpp +++ b/src/Mod/Spreadsheet/Gui/SpreadsheetDelegate.cpp @@ -50,7 +50,10 @@ QWidget *SpreadsheetDelegate::createEditor(QWidget *parent, editor->setIndex(index); editor->setDocumentObject(sheet); - connect(editor, SIGNAL(returnPressed()), this, SLOT(commitAndCloseEditor())); + // See https://forum.freecadweb.org/viewtopic.php?f=3&t=41694 + // It looks like the slot commitAndCloseEditor() is not needed any more and even + // causes a crash when doing so because the LineEdit is still accessed after its destruction. + //connect(editor, SIGNAL(returnPressed()), this, SLOT(commitAndCloseEditor())); return editor; }