Fix crash when adding datum and there's no active body

Plus fix double messageboxes about the lack of the body,
This commit is contained in:
DeepSOIC
2015-05-14 00:18:47 +03:00
committed by Stefan Tröger
parent 5e18faa018
commit da545f3978
5 changed files with 38 additions and 22 deletions

View File

@@ -243,7 +243,7 @@ void TaskTransformedParameters::showObject()
void TaskTransformedParameters::hideBase()
{
Gui::Document* doc = Gui::Application::Instance->activeDocument();
PartDesign::Body* pcActiveBody = PartDesignGui::getBody();
PartDesign::Body* pcActiveBody = PartDesignGui::getBody(/*messageIfNot = */false);
if (doc && pcActiveBody) {
App::DocumentObject* prevFeature;
if (insideMultiTransform) {
@@ -259,7 +259,7 @@ void TaskTransformedParameters::hideBase()
void TaskTransformedParameters::showBase()
{
Gui::Document* doc = Gui::Application::Instance->activeDocument();
PartDesign::Body* pcActiveBody = PartDesignGui::getBody();
PartDesign::Body* pcActiveBody = PartDesignGui::getBody(/*messageIfNot = */false);
if (doc && pcActiveBody) {
App::DocumentObject* prevFeature;
if (insideMultiTransform) {