Show opacity when brush is an image (ignoring the ink type)

This commit is contained in:
David Capello 2015-07-23 10:43:16 -03:00
parent 66ddc62a76
commit 6aeee0b8fa

View File

@ -1091,14 +1091,19 @@ void ContextBar::updateForTool(tools::Tool* tool)
(tool->getController(0)->isFreehand() ||
tool->getController(1)->isFreehand());
bool showOpacity =
(supportOpacity) &&
((isPaint && (hasInkWithOpacity || hasImageBrush)) ||
(isEffect));
// Show/Hide fields
m_brushType->setVisible(supportOpacity && (!isFloodfill || (isFloodfill && hasImageBrush)));
m_brushSize->setVisible(supportOpacity && !isFloodfill && !hasImageBrush);
m_brushAngle->setVisible(supportOpacity && !isFloodfill && !hasImageBrush && hasBrushWithAngle);
m_brushPatternField->setVisible(supportOpacity && hasImageBrush);
m_inkType->setVisible(hasInk && !hasImageBrush);
m_inkOpacityLabel->setVisible(hasInkWithOpacity && supportOpacity);
m_inkOpacity->setVisible(hasInkWithOpacity && supportOpacity);
m_inkOpacityLabel->setVisible(showOpacity);
m_inkOpacity->setVisible(showOpacity);
m_eyedropperField->setVisible(isEyedropper);
m_autoSelectLayer->setVisible(isMove);
m_freehandBox->setVisible(isFreehand && supportOpacity);