diff --git a/src/client/tools/brushes.h b/src/client/tools/brushes.h index fce0d824c..c1f307599 100644 --- a/src/client/tools/brushes.h +++ b/src/client/tools/brushes.h @@ -26,14 +26,14 @@ namespace tools { //! Freehand brush tool class Freehand : public Tool { - public: - Freehand(ToolController &owner); +public: + Freehand(ToolController &owner); - void begin(const paintcore::Point& point, float zoom); - void motion(const paintcore::Point& point, bool constrain, bool center); - void end(); + void begin(const paintcore::Point& point, float zoom) override; + void motion(const paintcore::Point& point, bool constrain, bool center) override; + void end() override; - bool allowSmoothing() const { return true; } + bool allowSmoothing() const override { return true; } }; } diff --git a/src/desktop/docks/brushpalettedock.cpp b/src/desktop/docks/brushpalettedock.cpp index 660682b53..2c9aa55da 100644 --- a/src/desktop/docks/brushpalettedock.cpp +++ b/src/desktop/docks/brushpalettedock.cpp @@ -76,6 +76,10 @@ BrushPalette::BrushPalette(QWidget *parent) return; } d->presets->addBrush(d->brushSettings->getCurrentBrushSettings()); + d->ui.brushPaletteView->selectionModel()->select( + d->presets->index(d->presets->rowCount()-1, 0), + QItemSelectionModel::ClearAndSelect|QItemSelectionModel::Current + ); }); connect(d->ui.presetSave, &QAbstractButton::clicked, this, [this]() { @@ -102,6 +106,7 @@ BrushPalette::BrushPalette(QWidget *parent) return; } d->presets->removeRow(sel.first().row()); + d->ui.brushPaletteView->selectionModel()->clear(); }); } diff --git a/src/desktop/toolwidgets/brushsettings.cpp b/src/desktop/toolwidgets/brushsettings.cpp index 4804e5888..045b3c33f 100644 --- a/src/desktop/toolwidgets/brushsettings.cpp +++ b/src/desktop/toolwidgets/brushsettings.cpp @@ -110,7 +110,7 @@ static paintcore::Brush brushFromProps(const ToolProperties &bp, const ToolPrope else b.setSmudge2(b.smudge1()); - b.setResmudge(bp.intValue(brushprop::RESMUDGE, 1, 0, 255)); + b.setResmudge(bp.intValue(brushprop::RESMUDGE, 3, 0, 255)); // Watercolor mode requires incremental drawing b.setIncremental(true); @@ -383,11 +383,11 @@ void BrushSettings::updateUi() d->ui.brushhardness0->setValue(brush.intValue(brushprop::HARD2, 100)); d->ui.hardnessPressure->setChecked(brushMode != 0 && brush.boolValue(brushprop::HARD_PRESSURE, false)); - d->ui.brushsmudging->setValue(brush.intValue(brushprop::SMUDGE, 100)); - d->ui.brushsmudging0->setValue(brush.intValue(brushprop::SMUDGE2, 100)); + d->ui.brushsmudging->setValue(brush.intValue(brushprop::SMUDGE, 50)); + d->ui.brushsmudging0->setValue(brush.intValue(brushprop::SMUDGE2, 0)); d->ui.smudgingPressure->setChecked(brushMode == 2 && brush.boolValue(brushprop::SMUDGE_PRESSURE, false)); - d->ui.colorpickup->setValue(brush.intValue(brushprop::RESMUDGE, 1, 0)); + d->ui.colorpickup->setValue(brush.intValue(brushprop::RESMUDGE, 3, 0, 255)); d->ui.brushspacing->setValue(brush.intValue(brushprop::SPACING, 10)); if(brush.boolValue(brushprop::INCREMENTAL, true))