From c212e75fcce0324b446ec00e193da10856361b55 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 13 May 2014 16:20:51 +0200 Subject: [PATCH] + allow to always run macros, fix disappearing grid in sketcher --- src/Gui/Command.cpp | 1 + src/Mod/Part/Gui/ViewProvider2DObject.cpp | 2 +- src/Mod/PartDesign/Gui/TaskPadParameters.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Gui/Command.cpp b/src/Gui/Command.cpp index f1c4439d2..be4d9f955 100644 --- a/src/Gui/Command.cpp +++ b/src/Gui/Command.cpp @@ -676,6 +676,7 @@ MacroCommand::MacroCommand(const char* name) #endif { sGroup = QT_TR_NOOP("Macros"); + eType = 0; } void MacroCommand::activated(int iMsg) diff --git a/src/Mod/Part/Gui/ViewProvider2DObject.cpp b/src/Mod/Part/Gui/ViewProvider2DObject.cpp index 3c40c0631..e540a67e7 100644 --- a/src/Mod/Part/Gui/ViewProvider2DObject.cpp +++ b/src/Mod/Part/Gui/ViewProvider2DObject.cpp @@ -198,8 +198,8 @@ void ViewProvider2DObject::updateData(const App::Property* prop) if (prop->getTypeId() == Part::PropertyPartShape::getClassTypeId()) { Base::BoundBox3d bbox = static_cast(prop)->getBoundingBox(); - GridRoot->removeAllChildren(); if (!bbox.IsValid()) return; + GridRoot->removeAllChildren(); Base::Placement place = static_cast(prop)->getComplexData()->getPlacement(); place.invert(); Base::ViewProjMatrix proj(place.toMatrix()); diff --git a/src/Mod/PartDesign/Gui/TaskPadParameters.cpp b/src/Mod/PartDesign/Gui/TaskPadParameters.cpp index 27a22ea0e..9d37fb869 100644 --- a/src/Mod/PartDesign/Gui/TaskPadParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskPadParameters.cpp @@ -287,7 +287,7 @@ void TaskPadParameters::onModeChanged(int index) case 0: pcPad->Type.setValue("Length"); // Avoid error message - if (ui->lengthEdit->getQuantity() < Precision::Confusion()) + if (ui->lengthEdit->getQuantity().getValue() < Precision::Confusion()) ui->lengthEdit->setValue(5.0); break; case 1: pcPad->Type.setValue("UpToLast"); break;