Changeset View
Changeset View
Standalone View
Standalone View
libs/ui/kis_node_manager.cpp
Show First 20 Lines • Show All 812 Lines • ▼ Show 20 Line(s) | |||||
813 | 813 | | |||
814 | void KisNodeManager::activateNextNode() | 814 | void KisNodeManager::activateNextNode() | ||
815 | { | 815 | { | ||
816 | KisNodeSP activeNode = this->activeNode(); | 816 | KisNodeSP activeNode = this->activeNode(); | ||
817 | if (!activeNode) return; | 817 | if (!activeNode) return; | ||
818 | 818 | | |||
819 | KisNodeSP node = activeNode->nextSibling(); | 819 | KisNodeSP node = activeNode->nextSibling(); | ||
820 | 820 | | |||
821 | while (node && node->childCount() > 0 && node->isEditable()) { | ||||
822 | node = node->firstChild(); | ||||
823 | } | ||||
824 | | ||||
821 | if (!node && activeNode->parent() && activeNode->parent()->parent()) { | 825 | if (!node && activeNode->parent() && activeNode->parent()->parent()) { | ||
822 | node = activeNode->parent(); | 826 | node = activeNode->parent(); | ||
823 | } | 827 | } | ||
824 | 828 | | |||
825 | while(node && checkForGlobalSelection(node)) { | 829 | while(node && checkForGlobalSelection(node)) { | ||
826 | node = node->nextSibling(); | 830 | node = node->nextSibling(); | ||
827 | } | 831 | } | ||
828 | 832 | | |||
829 | if (node) { | 833 | if (node) { | ||
830 | slotNonUiActivatedNode(node); | 834 | slotNonUiActivatedNode(node); | ||
831 | } | 835 | } | ||
832 | } | 836 | } | ||
833 | 837 | | |||
834 | void KisNodeManager::activatePreviousNode() | 838 | void KisNodeManager::activatePreviousNode() | ||
835 | { | 839 | { | ||
836 | KisNodeSP activeNode = this->activeNode(); | 840 | KisNodeSP activeNode = this->activeNode(); | ||
837 | if (!activeNode) return; | 841 | if (!activeNode) return; | ||
838 | 842 | | |||
839 | KisNodeSP node = activeNode->prevSibling(); | 843 | KisNodeSP node; | ||
844 | | ||||
845 | if (activeNode->childCount() > 0 && activeNode->isEditable()) { | ||||
846 | node = activeNode->lastChild(); | ||||
847 | } | ||||
dkazakov: KDE policies ask to write
if (...) {
} else { // else keyword on the same line as the closing… | |||||
848 | else { | ||||
849 | node = activeNode->prevSibling(); | ||||
850 | } | ||||
840 | 851 | | |||
841 | if (!node && activeNode->parent()) { | 852 | while (!node && activeNode->parent()) { | ||
842 | node = activeNode->parent()->prevSibling(); | 853 | node = activeNode->parent()->prevSibling(); | ||
854 | activeNode = activeNode->parent(); | ||||
843 | } | 855 | } | ||
844 | 856 | | |||
845 | while(node && checkForGlobalSelection(node)) { | 857 | while(node && checkForGlobalSelection(node)) { | ||
846 | node = node->prevSibling(); | 858 | node = node->prevSibling(); | ||
847 | } | 859 | } | ||
848 | 860 | | |||
849 | if (node) { | 861 | if (node) { | ||
850 | slotNonUiActivatedNode(node); | 862 | slotNonUiActivatedNode(node); | ||
▲ Show 20 Lines • Show All 452 Lines • Show Last 20 Lines |
KDE policies ask to write
if (...) {
} else { // else keyword on the same line as the closing curly brace
}
It's not a problem, just to let you know :)