Core: Add VarSets to Groups

If a Group is selected, add the VarSet to the group.
This commit is contained in:
Pieter Hijma
2024-05-19 15:39:46 +02:00
parent 5670777eeb
commit ec841ed6d4
3 changed files with 25 additions and 2 deletions

View File

@@ -33,6 +33,7 @@
#include <App/Document.h>
#include <App/Origin.h>
#include <App/Part.h>
#include <App/VarSet.h>
#include <Base/Console.h>
#include <Gui/ActionFunction.h>
#include <Gui/Application.h>
@@ -495,6 +496,9 @@ bool ViewProviderBody::canDropObjects() const
bool ViewProviderBody::canDropObject(App::DocumentObject* obj) const
{
if (obj->isDerivedFrom<App::VarSet>()) {
return true;
}
if (!obj->isDerivedFrom(Part::Feature::getClassTypeId())) {
return false;
}