[Calligra] 22257a1 Select the newly created adjustment layer, shape l

Boudewijn Rempt boud at valdyas.org
Wed Dec 22 16:21:37 CET 2010


On Sunday 19 December 2010, Cyrille Berger wrote:
> commit 22257a1bfdbbce33df4f1c78ab19684457fa9be3
> branch master
> Author: Cyrille Berger <cberger at cberger.net>
> Date:   Sun Dec 19 12:06:25 2010 +0100
> 
>     Select the newly created adjustment layer, shape layer and generated layer.
>     
>     This should probably be backported to 2.3, after review, since it prevents a crash when adding one of those layers to an empty stack and using the move tool.

Ack, please commit.

>     
>     CCMAIL: kimageshop at kde.org
> 
> diff --git a/krita/ui/kis_layer_manager.cc b/krita/ui/kis_layer_manager.cc
> index a30a5c8..edb4dd5 100644
> --- a/krita/ui/kis_layer_manager.cc
> +++ b/krita/ui/kis_layer_manager.cc
> @@ -401,6 +401,7 @@ void KisLayerManager::addCloneLayer(KisNodeSP parent, KisNodeSP above)
>  
>              layer->setCompositeOp(COMPOSITE_OVER);
>              m_commandsAdapter->addNode(layer.data(), parent.data(), above.data());
> +            m_view->nodeManager()->activateNode(layer);
>  
>              m_view->canvas()->update();
>  
> @@ -435,6 +436,7 @@ void KisLayerManager::addShapeLayer(KisNodeSP parent, KisNodeSP above)
>          if (layer) {
>              layer->setCompositeOp(COMPOSITE_OVER);
>              m_commandsAdapter->addNode(layer.data(), parent, above.data());
> +            m_view->nodeManager()->activateNode(layer);
>              m_view->canvas()->update();
>          } else {
>              KMessageBox::error(m_view, i18n("Could not add layer to image."), i18n("Layer Error"));
> @@ -474,6 +476,7 @@ void KisLayerManager::addAdjustmentLayer(KisNodeSP parent, KisNodeSP above)
>          m_commandsAdapter->undoLastCommand();
>      } else {
>          adjl->setName(dlg.layerName());
> +        m_view->nodeManager()->activateNode(adjl);
>      }
>  }
>  
> @@ -525,6 +528,7 @@ void KisLayerManager::addGeneratorLayer(KisNodeSP parent, KisNodeSP above, const
>  
>      KisGeneratorLayerSP l = new KisGeneratorLayer(image, name, generator, selection);
>      m_commandsAdapter->addNode(l.data(), parent, above.data());
> +    m_view->nodeManager()->activateNode(l);
>      if (l->selection())
>          l->setDirty(l->selection()->selectedExactRect());
>      else
> _______________________________________________
> kimageshop mailing list
> kimageshop at kde.org
> https://mail.kde.org/mailman/listinfo/kimageshop
> 
> 


-- 
Boudewijn Rempt | http://www.valdyas.org, http://www.krita.org


More information about the kimageshop mailing list