From ff9c3fafdbedd6797f180f5f176764b00947e611 Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 14 Oct 2011 16:13:16 +0000 Subject: [PATCH] + show forbidden cursor in task shape builder for all non-shape types git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5018 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d --- src/Mod/Part/Gui/TaskShapeBuilder.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Mod/Part/Gui/TaskShapeBuilder.cpp b/src/Mod/Part/Gui/TaskShapeBuilder.cpp index cd9ce5a93..776569d02 100644 --- a/src/Mod/Part/Gui/TaskShapeBuilder.cpp +++ b/src/Mod/Part/Gui/TaskShapeBuilder.cpp @@ -64,8 +64,10 @@ namespace PartGui { { this->mode = mode; } - bool allow(App::Document*, App::DocumentObject*, const char*sSubName) + bool allow(App::Document*, App::DocumentObject* obj, const char*sSubName) { + if (!obj || !obj->isDerivedFrom(Part::Feature::getClassTypeId())) + return false; if (!sSubName || sSubName[0] == '\0') return (mode == ALL); std::string element(sSubName); @@ -346,7 +348,7 @@ void ShapeBuilderWidget::switchMode(int mode) } else { d->gate->setMode(ShapeSelection::ALL); - d->ui.label->setText(tr("You can select all shapes")); + d->ui.label->setText(tr("All shape types can be selected")); d->ui.checkPlanar->setEnabled(false); d->ui.checkFaces->setEnabled(false); }