Paste P114

Masterwork From Distant Lands
ActivePublic

Authored by dkazakov on Oct 11 2017, 2:15 PM.
diff --git a/libs/image/tiles3/kis_tiled_data_manager.cc b/libs/image/tiles3/kis_tiled_data_manager.cc
index 8bcf684..df29afc 100644
--- a/libs/image/tiles3/kis_tiled_data_manager.cc
+++ b/libs/image/tiles3/kis_tiled_data_manager.cc
@@ -385,7 +385,13 @@ void KisTiledDataManager::clear(QRect clearRect, const quint8 *clearPixel)
if (clearTileRect == tileRect) {
// Clear whole tile
m_hashTable->deleteTile(column, row);
- needsRecalculateExtent = true;
+
+ if (!needsRecalculateExtent &&
+ (m_extentMinX == tileRect.left() || m_extentMaxX == tileRect.right() ||
+ m_extentMinY == tileRect.top() || m_extentMaxY == tileRect.bottom())) {
+
+ needsRecalculateExtent = true;
+ }
if (!pixelBytesAreDefault) {
KisTileSP clearedTile = KisTileSP(new KisTile(column, row, td, m_mementoManager));
dkazakov edited the content of this paste. (Show Details)Oct 11 2017, 2:15 PM
dkazakov changed the title of this paste from untitled to Masterwork From Distant Lands.
dkazakov updated the paste's language from autodetect to autodetect.