[graphics/krita] /: Remove the rasterize layer action

Halla Rempt null at kde.org
Thu Jan 7 15:06:52 GMT 2021


Git commit e5af48a915faebc1f37c48212deafb9f9d42e775 by Halla Rempt.
Committed on 07/01/2021 at 15:06.
Pushed by rempt into branch 'master'.

Remove the rasterize layer action

It duplicates the convert layer actions we build since then.

This also needs updating the master branch of the manual!

CCMAIL:kimageshop at kde.org

M  +0    -1    krita/data/shortcuts/krita_default.shortcuts
M  +0    -1    krita/data/shortcuts/paint_tool_sai_compatible.shortcuts
M  +0    -1    krita/data/shortcuts/photoshop_compatible.shortcuts
M  +0    -1    krita/data/shortcuts/tablet_pro.shortcuts
M  +0    -12   krita/krita.action
M  +0    -1    krita/krita5.xmlgui
M  +0    -32   libs/ui/kis_layer_manager.cc
M  +0    -1    libs/ui/kis_layer_manager.h

https://invent.kde.org/graphics/krita/commit/e5af48a915faebc1f37c48212deafb9f9d42e775

diff --git a/krita/data/shortcuts/krita_default.shortcuts b/krita/data/shortcuts/krita_default.shortcuts
index cc0168a19e..d6a2f481a6 100644
--- a/krita/data/shortcuts/krita_default.shortcuts
+++ b/krita/data/shortcuts/krita_default.shortcuts
@@ -191,7 +191,6 @@ previous_favorite_preset=.
 previous_frame=none
 previous_keyframe=none
 previous_preset=/
-rasterize_layer=none
 Recording_Start_Recording_Macro=none
 Recording_Stop_Recording_Macro=none
 reload_preset_action=none
diff --git a/krita/data/shortcuts/paint_tool_sai_compatible.shortcuts b/krita/data/shortcuts/paint_tool_sai_compatible.shortcuts
index eda241f5c3..fce77b5638 100644
--- a/krita/data/shortcuts/paint_tool_sai_compatible.shortcuts
+++ b/krita/data/shortcuts/paint_tool_sai_compatible.shortcuts
@@ -302,7 +302,6 @@ previous_favorite_preset=.
 previous_frame=none
 previous_keyframe=none
 previous_preset=/
-rasterize_layer=none
 Recording_Start_Recording_Macro=none
 Recording_Stop_Recording_Macro=none
 ReferencesTool=none
diff --git a/krita/data/shortcuts/photoshop_compatible.shortcuts b/krita/data/shortcuts/photoshop_compatible.shortcuts
index 02b101a14a..98fe153295 100644
--- a/krita/data/shortcuts/photoshop_compatible.shortcuts
+++ b/krita/data/shortcuts/photoshop_compatible.shortcuts
@@ -302,7 +302,6 @@ previous_favorite_preset=.
 previous_frame=none
 previous_keyframe=none
 previous_preset=/
-rasterize_layer=none
 Recording_Start_Recording_Macro=none
 Recording_Stop_Recording_Macro=none
 ReferencesTool=none
diff --git a/krita/data/shortcuts/tablet_pro.shortcuts b/krita/data/shortcuts/tablet_pro.shortcuts
index 413d9c862f..5cfff2084a 100644
--- a/krita/data/shortcuts/tablet_pro.shortcuts
+++ b/krita/data/shortcuts/tablet_pro.shortcuts
@@ -319,7 +319,6 @@ previous_frame=none
 previous_keyframe=none
 previous_preset=/
 quick_ungroup=Ctrl+Alt+G
-rasterize_layer=none
 Recording_Start_Recording_Macro=none
 Recording_Stop_Recording_Macro=none
 ReferencesTool=none
diff --git a/krita/krita.action b/krita/krita.action
index e086f82786..ef68ee4290 100644
--- a/krita/krita.action
+++ b/krita/krita.action
@@ -3524,18 +3524,6 @@ Enable to preserve playback timing.</text>
       <isCheckable>false</isCheckable>
       <statusTip></statusTip>
     </Action>
-    <Action name="rasterize_layer">
-      <icon></icon>
-      <text>Ras&terize Layer</text>
-      <whatsThis></whatsThis>
-      <toolTip>Rasterize Layer</toolTip>
-      <iconText>Rasterize Layer</iconText>
-      <activationFlags>10000000</activationFlags>
-      <activationConditions>1</activationConditions>
-      <shortcut></shortcut>
-      <isCheckable>false</isCheckable>
-      <statusTip></statusTip>
-    </Action>
     <Action name="flatten_image">
       <icon></icon>
       <text>Flatten ima&ge</text>
diff --git a/krita/krita5.xmlgui b/krita/krita5.xmlgui
index efbc9abd70..cb1e3243d4 100644
--- a/krita/krita5.xmlgui
+++ b/krita/krita5.xmlgui
@@ -274,7 +274,6 @@ xsi:schemaLocation="http://www.kde.org/standards/kxmlgui/1.0  http://www.kde.org
       <Separator/>
       <Action name="merge_layer"/>
       <Action name="flatten_layer"/>
-      <Action name="rasterize_layer"/>
       <Action name="merge_all_shape_layers"/>
       <Action name="flatten_image"/>
       <Action name="merge_selected_layers"/>
diff --git a/libs/ui/kis_layer_manager.cc b/libs/ui/kis_layer_manager.cc
index a770e9ca8e..19d0854a00 100644
--- a/libs/ui/kis_layer_manager.cc
+++ b/libs/ui/kis_layer_manager.cc
@@ -150,9 +150,6 @@ void KisLayerManager::setup(KisActionManager* actionManager)
     m_flattenLayer = actionManager->createAction("flatten_layer");
     connect(m_flattenLayer, SIGNAL(triggered()), this, SLOT(flattenLayer()));
 
-    m_rasterizeLayer = actionManager->createAction("rasterize_layer");
-    connect(m_rasterizeLayer, SIGNAL(triggered()), this, SLOT(rasterizeLayer()));
-
     m_groupLayersSave = actionManager->createAction("save_groups_as_images");
     connect(m_groupLayersSave, SIGNAL(triggered()), this, SLOT(saveGroupLayers()));
 
@@ -880,35 +877,6 @@ void KisLayerManager::flattenLayer()
     m_view->updateGUI();
 }
 
-void KisLayerManager::rasterizeLayer()
-{
-    KisImageSP image = m_view->image();
-    if (!image) return;
-
-    KisLayerSP layer = activeLayer();
-    if (!layer) return;
-
-    if (!m_view->blockUntilOperationsFinished(image)) return;
-    if (!m_view->nodeManager()->canModifyLayer(layer)) return;
-
-    KisPaintLayerSP paintLayer = new KisPaintLayer(image, layer->name(), layer->opacity());
-    KisPainter gc(paintLayer->paintDevice());
-    QRect rc = layer->projection()->exactBounds();
-    gc.bitBlt(rc.topLeft(), layer->projection(), rc);
-
-    m_commandsAdapter->beginMacro(kundo2_i18n("Rasterize Layer"));
-    m_commandsAdapter->addNode(paintLayer.data(), layer->parent().data(), layer.data());
-
-    int childCount = layer->childCount();
-    for (int i = 0; i < childCount; i++) {
-        m_commandsAdapter->moveNode(layer->firstChild(), paintLayer, paintLayer->lastChild());
-    }
-    m_commandsAdapter->removeNode(layer);
-    m_commandsAdapter->endMacro();
-    updateGUI();
-}
-
-
 void KisLayerManager::layersUpdated()
 {
     KisLayerSP layer = activeLayer();
diff --git a/libs/ui/kis_layer_manager.h b/libs/ui/kis_layer_manager.h
index 3bc68296a2..bf8e84a4d2 100644
--- a/libs/ui/kis_layer_manager.h
+++ b/libs/ui/kis_layer_manager.h
@@ -69,7 +69,6 @@ private Q_SLOTS:
     void flattenImage();
 
     void flattenLayer();
-    void rasterizeLayer();
 
     void layersUpdated();
 


More information about the kimageshop mailing list