Core: Print warning if dragging is not allowed

This commit is contained in:
wmayer
2024-11-10 17:14:18 +01:00
parent c14ef04b70
commit 76a3ec410f

View File

@@ -75,7 +75,7 @@ bool ViewProviderGroupExtension::extensionCanDropObjects() const {
bool ViewProviderGroupExtension::extensionCanDropObject(App::DocumentObject* obj) const
{
#ifdef FC_DEBUG
Base::Console().Log("Check ViewProviderGroupExtension");
Base::Console().Log("Check ViewProviderGroupExtension\n");
#endif
auto extobj = getExtendedViewProvider()->getObject();
@@ -89,6 +89,7 @@ bool ViewProviderGroupExtension::extensionCanDropObject(App::DocumentObject* obj
// Check for possible cyclic dependencies if we allowed to drop the object
const auto& list = obj->getOutList();
if (std::find(list.begin(), list.end(), extobj) != list.end()) {
Base::Console().Warning("Do not add cyclic dependency to %s\n", extobj->Label.getValue());
return false;
}