From f2ee53d70698def3c4296f3899f2f118e5d26d4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Sun, 1 Sep 2024 22:49:48 +0200 Subject: [PATCH] UX: Set fill/stroke view based on item --- src/app/GUI/fillstrokesettings.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/app/GUI/fillstrokesettings.cpp b/src/app/GUI/fillstrokesettings.cpp index 6e8af12f0..3c90488f9 100644 --- a/src/app/GUI/fillstrokesettings.cpp +++ b/src/app/GUI/fillstrokesettings.cpp @@ -518,8 +518,14 @@ void FillStrokeSettingsWidget::setCurrentSettings(PaintSettingsAnimator *fillPai { setFillValuesFromFillSettings(fillPaintSettings); setStrokeValuesFromStrokeSettings(strokePaintSettings); - if (mTarget == PaintSetting::FILL) { setFillTarget(); } - else { setStrokeTarget(); } + + const bool hasFill = fillPaintSettings ? fillPaintSettings->getPaintType() != PaintType::NOPAINT : false; + const bool hasStroke = strokePaintSettings ? strokePaintSettings->getPaintType() != PaintType::NOPAINT : false; + if (hasStroke && !hasFill) { setStrokeTarget(); } + else { setFillTarget(); } + + //if (mTarget == PaintSetting::FILL) { setFillTarget(); } + //else { setStrokeTarget(); } } void FillStrokeSettingsWidget::clearAll()