From 952d598ca9db4d110e428b63ea6d0481c862c5e7 Mon Sep 17 00:00:00 2001 From: jriegel Date: Mon, 22 Sep 2014 10:25:59 +0200 Subject: [PATCH] Assembly: Add warning on conversion --- src/Mod/PartDesign/Gui/Workbench.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/Mod/PartDesign/Gui/Workbench.cpp b/src/Mod/PartDesign/Gui/Workbench.cpp index 61bffae13..a2f26c1ad 100644 --- a/src/Mod/PartDesign/Gui/Workbench.cpp +++ b/src/Mod/PartDesign/Gui/Workbench.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -150,6 +151,26 @@ void switchToDocument(const App::Document* doc) // Is there a body feature in this document? if (bodies.empty()) { + + if(doc->countObjects() != 0) { + // show a warning about the convertion + Gui::Dialog::DlgCheckableMessageBox::showMessage( + QString::fromLatin1("PartDesign conversion warning"), + QString::fromLatin1( + "

Converting PartDesign features to new Body centric schema

" + "If you are unsure what that mean save the document under a new name.
" + "You will not be able to load your work in an older Version of FreeCAD,
" + "After the translation took place...

" + "More information you will find here:
" + " http://www.freecadweb.org/wiki/index.php?title=Assembly_project
" + "Or the Assembly dedicated portion of our forum:
" + " http://forum.freecadweb.org/
" + ), + false, + QString::fromLatin1("Don't tell me again, I know!") + ); + } + Gui::Command::openCommand("Migrate part to Body feature"); // Get the objects now, before adding the Body and the base planes