Changeset View
Changeset View
Standalone View
Standalone View
libs/ui/kis_layer_manager.cc
Show First 20 Lines • Show All 554 Lines • ▼ Show 20 Line(s) | |||||
555 | 555 | | |||
556 | void KisLayerManager::adjustLayerPosition(KisNodeSP node, KisNodeSP activeNode, KisNodeSP &parent, KisNodeSP &above) | 556 | void KisLayerManager::adjustLayerPosition(KisNodeSP node, KisNodeSP activeNode, KisNodeSP &parent, KisNodeSP &above) | ||
557 | { | 557 | { | ||
558 | Q_ASSERT(activeNode); | 558 | Q_ASSERT(activeNode); | ||
559 | 559 | | |||
560 | parent = activeNode; | 560 | parent = activeNode; | ||
561 | above = parent->lastChild(); | 561 | above = parent->lastChild(); | ||
562 | 562 | | |||
563 | if (parent->inherits("KisGroupLayer") && parent->collapsed()) { | ||||
564 | above = parent; | ||||
565 | parent = parent->parent(); | ||||
566 | return; | ||||
567 | } | ||||
568 | | ||||
563 | while (parent && | 569 | while (parent && | ||
564 | (!parent->allowAsChild(node) || parent->userLocked())) { | 570 | (!parent->allowAsChild(node) || parent->userLocked())) { | ||
565 | 571 | | |||
566 | above = parent; | 572 | above = parent; | ||
567 | parent = parent->parent(); | 573 | parent = parent->parent(); | ||
568 | } | 574 | } | ||
569 | 575 | | |||
570 | if (!parent) { | 576 | if (!parent) { | ||
▲ Show 20 Lines • Show All 401 Lines • Show Last 20 Lines |