Fix for restoreColors()
restoreColors() needed a fix to not clear the paint of unclosed shapes.
This commit is contained in:
parent
dc046e027c
commit
313f5e0eb4
2 changed files with 8 additions and 9 deletions
|
@ -1051,15 +1051,13 @@ void fillAreaWithUndo(const TImageP &img, const TRectD &area, TStroke *stroke,
|
|||
for (int tempY = 0; tempY < tempRaster->getLy(); tempY++) {
|
||||
for (int tempX = 0; tempX < tempRaster->getLx();
|
||||
tempX++, tempPix++, keepPix++) {
|
||||
if (tempPix->getInk() >= IGNORECOLORSTYLE ||
|
||||
tempPix->getPaint() >= IGNORECOLORSTYLE) {
|
||||
continue;
|
||||
} else {
|
||||
// Handle all other pixels
|
||||
if (tempPix->getInk() < IGNORECOLORSTYLE) {
|
||||
keepPix->setInk(tempPix->getInk());
|
||||
keepPix->setPaint(tempPix->getPaint());
|
||||
keepPix->setTone(tempPix->getTone());
|
||||
}
|
||||
if (tempPix->getPaint() < IGNORECOLORSTYLE) {
|
||||
keepPix->setPaint(tempPix->getPaint());
|
||||
}
|
||||
keepPix->setTone(tempPix->getTone());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -99,8 +99,9 @@ void restoreColors(const TRasterCM32P &r,
|
|||
// in order to make the paint to protrude behind the line
|
||||
params.m_prevailing = false;
|
||||
for (UINT i = 0; i < seeds.size(); i++) {
|
||||
params.m_p = seeds[i].first;
|
||||
params.m_styleId = seeds[i].second;
|
||||
params.m_p = seeds[i].first;
|
||||
// params.m_styleId = seeds[i].second;
|
||||
params.m_styleId = IGNORECOLORSTYLE;
|
||||
fill(r, params);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue