Avoid creating a copy of the tileset for the BrushPreview

This commit is contained in:
David Capello 2021-06-16 14:22:01 -03:00
parent 47c836fde1
commit d9e2f27e85

View File

@ -291,7 +291,7 @@ public:
Layer* getLayer() override { return m_layer; }
const Cel* getCel() override { return nullptr; }
bool isTilemapMode() override { return m_tilesMode; };
bool isManualTilesetMode() const override { return m_tilesetMode == TilesetMode::Manual; };
bool isManualTilesetMode() const override { return m_tilesetMode == TilesetMode::Manual; }
frame_t getFrame() override { return m_frame; }
RgbMap* getRgbMap() override {
if (!m_rgbMap) {
@ -977,6 +977,12 @@ public:
void invalidateDstImage(const gfx::Region& rgn) override { }
void copyValidDstToSrcImage(const gfx::Region& rgn) override { }
bool isManualTilesetMode() const override {
// Return false because this is only the preview, so we avoid
// creating a new tileset
return false;
}
bool useMask() override { return false; }
Mask* getMask() override { return nullptr; }
void setMask(Mask* newMask) override { }