Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
+ fix crash when trying to edit broken revolve object
  • Loading branch information
wwmayer committed Jul 13, 2014
1 parent c90c4e1 commit af4aa69
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Mod/PartDesign/Gui/ViewProviderGroove.cpp
Expand Up @@ -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<PartDesign::Groove*>(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
Expand Down

0 comments on commit af4aa69

Please sign in to comment.