[TD]add extensions for drag and drop
This commit is contained in:
@@ -470,6 +470,19 @@ bool DrawPage::canUpdate() const
|
||||
return result;
|
||||
}
|
||||
|
||||
//true if object belongs to this page
|
||||
bool DrawPage::hasObject(App::DocumentObject* obj)
|
||||
{
|
||||
for (auto& outObj : getOutList()) {
|
||||
//TODO: check if pointer comparision is reliable enough
|
||||
if (outObj == obj) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//allow/prevent drawing updates for all Pages
|
||||
bool DrawPage::GlobalUpdateDrawings(void)
|
||||
{
|
||||
|
||||
@@ -107,6 +107,8 @@ public:
|
||||
|
||||
bool canUpdate() const;
|
||||
|
||||
bool hasObject(App::DocumentObject* obj);
|
||||
|
||||
protected:
|
||||
void onBeforeChange(const App::Property* prop) override;
|
||||
void onChanged(const App::Property* prop) override;
|
||||
|
||||
Reference in New Issue
Block a user