Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Reordere saving of the last activated node record

Dmitry Kazakov0039dd19cbf2
diff --git a/libs/ui/kis_node_manager.cpp b/libs/ui/kis_node_manager.cpp
index 2fb5b42dd2..d4528a1506 100644
--- a/libs/ui/kis_node_manager.cpp
+++ b/libs/ui/kis_node_manager.cpp
@@ -800,11 +800,18 @@ void KisNodeManager::slotSomethingActivatedNodeImpl(KisNodeSP node)
KIS_ASSERT_RECOVER_RETURN(node != activeNode());
if (m_d->activateNodeImpl(node)) {
+ if (node) {
+ /**
+ * Notify the dummies facade about the lastly
+ * activated node. This information may be used
+ * when a new view is created for the image.
+ */
+ dummiesFacade->setLastActivatedNode(node);
+ }
Q_EMIT sigUiNeedChangeActiveNode(node);
Q_EMIT sigNodeActivated(node);
nodesUpdated();
if (node) {
- dummiesFacade->setLastActivatedNode(node);
bool toggled = m_d->view->actionCollection()->action("view_show_canvas_only")->isChecked();
if (toggled) {
m_d->view->showFloatingMessage( node->name(), QIcon(), 1600, KisFloatingMessage::Medium, Qt::TextSingleLine);