From b4f5de314a07dfe45abc4db2036f1d81b32410d6 Mon Sep 17 00:00:00 2001 From: Jakob Gahde Date: Wed, 9 Aug 2023 00:47:29 +0200 Subject: [PATCH] Remove dead code --- core_lib/src/graphics/bitmap/bitmapbucket.cpp | 26 ------------------- core_lib/src/graphics/bitmap/bitmapbucket.h | 1 - 2 files changed, 27 deletions(-) diff --git a/core_lib/src/graphics/bitmap/bitmapbucket.cpp b/core_lib/src/graphics/bitmap/bitmapbucket.cpp index 558bcdffe..1cf3c18e4 100644 --- a/core_lib/src/graphics/bitmap/bitmapbucket.cpp +++ b/core_lib/src/graphics/bitmap/bitmapbucket.cpp @@ -187,29 +187,3 @@ BitmapImage BitmapBucket::flattenBitmapLayersToImage() } return flattenImage; } - -std::pair BitmapBucket::findBitmapLayerBelow(Layer* targetLayer, int layerIndex) const -{ - bool foundLayerBelow = false; - int layerBelowIndex = layerIndex; - for (int i = layerIndex - 1; i >= 0; i--) - { - Layer* searchlayer = mEditor->layers()->getLayer(i); - Q_ASSERT(searchlayer); - - if (searchlayer->type() == Layer::BITMAP && searchlayer->visible()) - { - targetLayer = searchlayer; - foundLayerBelow = true; - layerBelowIndex = i; - break; - } - } - - if (foundLayerBelow && !targetLayer->keyExists(mEditor->currentFrame())) - { - targetLayer->addNewKeyFrameAt(mEditor->currentFrame()); - emit mEditor->updateTimeLine(); - } - return std::make_pair(targetLayer, layerBelowIndex); -} diff --git a/core_lib/src/graphics/bitmap/bitmapbucket.h b/core_lib/src/graphics/bitmap/bitmapbucket.h index 90a8ce5c9..d4062aafa 100644 --- a/core_lib/src/graphics/bitmap/bitmapbucket.h +++ b/core_lib/src/graphics/bitmap/bitmapbucket.h @@ -59,7 +59,6 @@ class BitmapBucket */ bool allowFill(const QPoint& checkPoint) const; - std::pair findBitmapLayerBelow(Layer* targetLayer, int layerIndex) const; BitmapImage flattenBitmapLayersToImage(); Editor* mEditor = nullptr;