The document's own pixel budget, marching ants at screen resolution (12.11a)
This commit is contained in:
1 parent
ffba1753c6
commit
8a9c56ee1f
75 files changed
+759
-189
No files matched your search
@@ -1,4 +1,5 @@
|
||||
#include "Document/ProjectWorkspace.h"
|
||||
#include "Document/DocumentLimits.h"
|
||||
#include "Document/LiveLayerMask.h"
|
||||
#include "IO/ImageExporter.h"
|
||||
#include "Logging.h"
|
||||
@@ -80,8 +81,8 @@ void ProjectWorkspace::copyLayers(const std::vector<QUuid> &ids, std::optional<Q
|
||||
copy.layers.push_back(layer);
|
||||
}
|
||||
const qint64 used = copy.target->session.document() ? pixels(copy.target->session.document()->layers) : 0;
|
||||
if (used + pixels(copy.layers) > 100'000'000) {
|
||||
copy.target->session.setImportError(QStringLiteral("The copied layers exceed this project’s 100-megapixel limit."));
|
||||
if (used + pixels(copy.layers) > DocumentLimits::documentPixelBudget()) {
|
||||
copy.target->session.setImportError(QStringLiteral("The copied layers exceed this project’s %1-megapixel limit.").arg(DocumentLimits::documentBudgetMegapixels()));
|
||||
finish(done);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user