diff --git a/src/Gui/CommandDoc.cpp b/src/Gui/CommandDoc.cpp index a3d90ef604..e7482f1c88 100644 --- a/src/Gui/CommandDoc.cpp +++ b/src/Gui/CommandDoc.cpp @@ -1111,12 +1111,10 @@ void StdCmdDelete::activated(int iMsg) // check if the referenced objects are groups or are selected too for (std::vector::iterator lt = links.begin(); lt != links.end(); ++lt) { if ( - (!(*lt)->getTypeId().isDerivedFrom(App::DocumentObjectGroup::getClassTypeId())) && - (!(*lt)->getTypeId().isDerivedFrom(App::Origin::getClassTypeId())) && - (!rSel.isSelected(*lt)) && - (!(*lt)->getTypeId().isDerivedFrom(Base::Type::fromName("Part::BodyBase"))) + (!(*lt)->hasExtension(App::GroupExtension::getExtensionClassTypeId())) && + (!(*lt)->isDerivedFrom(App::Origin::getClassTypeId())) && + (!rSel.isSelected(*lt)) ){ - // TODO Do something with this hack of Part::BodyBase (2015-09-09, Fat-Zer) autoDeletion = false; affectedLabels.insert(QString::fromUtf8((*lt)->Label.getValue())); } diff --git a/src/Gui/Icons/Geofeaturegroup.svg b/src/Gui/Icons/Geofeaturegroup.svg index 3e2d643879..5ad951a294 100644 --- a/src/Gui/Icons/Geofeaturegroup.svg +++ b/src/Gui/Icons/Geofeaturegroup.svg @@ -1,4 +1,6 @@ + + + viewBox="0 0 64 64" + inkscape:export-filename="/Users/pablo/Desktop/partdesign_part.png" + inkscape:export-xdpi="192" + inkscape:export-ydpi="192"> + + + + + + + + + + + + + + + id="metadata2865"> image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + inkscape:label="Layer 1" + inkscape:groupmode="layer"> + + + + + + + + + + diff --git a/src/Gui/Icons/Group.svg b/src/Gui/Icons/Group.svg index c631372de0..1ebd0080f5 100644 --- a/src/Gui/Icons/Group.svg +++ b/src/Gui/Icons/Group.svg @@ -1,548 +1,67 @@ - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Gui/Icons/resource.qrc b/src/Gui/Icons/resource.qrc index 4c838926b4..70c03fd1a4 100644 --- a/src/Gui/Icons/resource.qrc +++ b/src/Gui/Icons/resource.qrc @@ -155,6 +155,8 @@ AddonManager.svg Group.svg Geofeaturegroup.svg + Std_Axis.svg + Std_Plane.svg diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index 433e237c9a..52fefe2476 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -1296,16 +1296,33 @@ QMimeData * MainWindow::createMimeDataFromSelection () const sel.insert(sel.end(), it->second.begin(), it->second.end()); all.insert(all.end(), dep.begin(), dep.end()); } - + if (all.size() > sel.size()) { - int ret = QMessageBox::question(getMainWindow(), - tr("Object dependencies"), - tr("The selected objects have a dependency to unselected objects.\n" - "Do you want to copy them, too?"), - QMessageBox::Yes,QMessageBox::No); - if (ret == QMessageBox::Yes) { + + //check if selection are only geofeaturegroup objects, for them it is intuitive and wanted to copy the + //dependencies + bool hasGroup = false, hasNormal = false; + for(auto obj : sel) { + if(obj->hasExtension(App::GroupExtension::getExtensionClassTypeId())) + hasGroup = true; + else + hasNormal = true; + } + if(hasGroup && !hasNormal) { sel = all; } + else { + //if there are normal objects selected it may be possible that some dependencies are + //from them, and not only from groups. so ask the user what to do. + int ret = QMessageBox::question(getMainWindow(), + tr("Object dependencies"), + tr("The selected objects have a dependency to unselected objects.\n" + "Do you want to copy them, too?"), + QMessageBox::Yes,QMessageBox::No); + if (ret == QMessageBox::Yes) { + sel = all; + } + } } unsigned int memsize=1000; // ~ for the meta-information diff --git a/src/Gui/ViewProviderLine.cpp b/src/Gui/ViewProviderLine.cpp index cebaed04cc..624dfc3149 100644 --- a/src/Gui/ViewProviderLine.cpp +++ b/src/Gui/ViewProviderLine.cpp @@ -43,7 +43,9 @@ PROPERTY_SOURCE(Gui::ViewProviderLine, Gui::ViewProviderOriginFeature) ViewProviderLine::ViewProviderLine() -{ } +{ + sPixmap = "Std_Axis"; +} ViewProviderLine::~ViewProviderLine() { } diff --git a/src/Gui/ViewProviderOriginFeature.cpp b/src/Gui/ViewProviderOriginFeature.cpp index d8e505faa7..5413297868 100644 --- a/src/Gui/ViewProviderOriginFeature.cpp +++ b/src/Gui/ViewProviderOriginFeature.cpp @@ -69,8 +69,6 @@ ViewProviderOriginFeature::ViewProviderOriginFeature () { pLabel = new SoAsciiText(); pLabel->ref(); pLabel->width.setValue(-1); - - sPixmap = "view-measurement"; } diff --git a/src/Gui/ViewProviderPlane.cpp b/src/Gui/ViewProviderPlane.cpp index 3805e4f8b1..6645166fc6 100644 --- a/src/Gui/ViewProviderPlane.cpp +++ b/src/Gui/ViewProviderPlane.cpp @@ -43,7 +43,9 @@ PROPERTY_SOURCE(Gui::ViewProviderPlane, Gui::ViewProviderOriginFeature) ViewProviderPlane::ViewProviderPlane() -{ } +{ + sPixmap = "Std_Plane"; +} ViewProviderPlane::~ViewProviderPlane() { }