Say why a brush cannot paint; paint at the layer's own resolution; Cancel and Apply only when an edit waits, scaled layers' scale (13.11)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-01 17:48:38 -04:00
1 parent 51e373af4c
commit cc9bf95722
24 files changed
+820 -129

No files matched your search

+6 -1
View File
@@ -35,8 +35,13 @@ void EditorSession::setGradientSettings(const GradientSettings &settings)
void EditorSession::beginGradient(QPointF point)
{
const std::optional<ImageLayer> layer = activeLayer();
if (m_tool != NavigationTool::gradient || !(canPaint() || m_gradientEdit) || !layer)
if (m_tool != NavigationTool::gradient || !layer)
return;
// Swift explains only past this guard, where nothing refuses.
if (!canPaint() && !m_gradientEdit) {
setBrushError(paintRefusal());
return;
}
// A new line on this target replaces the pending one.
if (m_gradientEdit && m_gradientEdit->raster->layer.id == layer->id && m_gradientEdit->raster->isMask == m_isMaskSelected) {
m_gradientEdit->start = point;