Commit 71126cc3 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Fix transformation of prespective assistants with secondary cages

If the assistant handle is owned by multiple assistants, then
transformation should be performed only by the "chief" assistant.

parent fef9ff85
......@@ -76,6 +76,11 @@ char KisPaintingAssistantHandle::handleType() const
return d->handle_type;
KisPaintingAssistant *KisPaintingAssistantHandle::chiefAssistant() const
return !d->assistants.isEmpty() ? d->assistants.first() : 0;
......@@ -439,10 +444,14 @@ bool KisPaintingAssistant::isAssistantComplete() const
void KisPaintingAssistant::transform(const QTransform &transform)
Q_FOREACH(KisPaintingAssistantHandleSP handle, handles()) {
if (handle->chiefAssistant() != this) continue;
*handle =*handle);
Q_FOREACH(KisPaintingAssistantHandleSP handle, sideHandles()) {
if (handle->chiefAssistant() != this) continue;
*handle =*handle);
......@@ -78,6 +78,13 @@ public:
void setType(char type);
char handleType() const;
* Returns the pointer to the "chief" assistant,
* which is supposed to handle transformations of the
* handle, when all the assistants are transformed
KisPaintingAssistant* chiefAssistant() const;
void registerAssistant(KisPaintingAssistant*);
void unregisterAssistant(KisPaintingAssistant*);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment