Whole layers on the clipboard and several duplicates (12.10b)

This commit is contained in:
雷电芽衣 committed 2026-09-28 19:09:46 -04:00
1 parent fc076de71d
commit 7a873eb9c7
18 files changed
+769 -212

No files matched your search

+14 -1
View File
@@ -2,11 +2,21 @@
public:
// Ctrl+X: copy, then clear the selected pixels.
void cutSelection(std::function<void()> done = {});
// A copy above the layer, then placed; never a folder.
// What Paste puts back in place, until another copy.
const std::optional<PixelClipboard> &pixelClipboard() const;
// The layers Copy took whole, until another copy.
const std::optional<CopiedLayer> &copiedLayer() const;
// Whether the clipboard still holds this very copy.
static bool clipboardHolds(const QPointer<QMimeData> &data);
// Every selected layer, a folder with all it holds.
void duplicateActiveLayer();
// Each layer copied as one step; the copies end selected.
void duplicateLayers(const std::vector<QUuid> &ids, const QString &editName = QStringLiteral("Duplicate Layer"));
bool duplicateLayer(QUuid id, std::optional<QUuid> parent, std::optional<QUuid> above = std::nullopt, bool atBottom = false);
std::optional<QRectF> selectionCopyRegion() const;
bool canCopyPixels() const;
// Copy with no selection takes the layers themselves.
bool canCopyLayer() const;
std::optional<CopiedPixels> renderSelectedPixels(const ImageLayer &layer, bool mask) const;
bool canCopyMerged() const;
std::optional<CopiedPixels> renderMergedPixels() const;
@@ -22,3 +32,6 @@ public:
private:
void store(const CopiedPixels &copied);
std::vector<QUuid> copiedLayerIDs() const;
std::optional<QUuid> insertCopy(QUuid id);