diff --git a/src/Mod/PartDesign/Gui/ViewProviderGroove.cpp b/src/Mod/PartDesign/Gui/ViewProviderGroove.cpp index 9771feb55c07..9b56d79c7b6f 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderGroove.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderGroove.cpp @@ -67,6 +67,16 @@ void ViewProviderGroove::setupContextMenu(QMenu* menu, QObject* receiver, const bool ViewProviderGroove::setEdit(int ModNum) { if (ModNum == ViewProvider::Default ) { + PartDesign::Groove* pcGroove = static_cast(getObject()); + if (pcGroove->getSketchAxisCount() < 0) { + QMessageBox msgBox; + msgBox.setIcon(QMessageBox::Critical); + msgBox.setWindowTitle(QObject::tr("Lost link to base sketch")); + msgBox.setText(QObject::tr("The object can't be edited because the link to the the base sketch is lost.")); + msgBox.setStandardButtons(QMessageBox::Ok); + msgBox.exec(); + return false; + } // When double-clicking on the item for this pad the // object unsets and sets its edit mode without closing // the task panel