From e4c6d588978530e2b722178b62302e847d601a32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C4=81rlis=20Se=C5=86ko?= Date: Fri, 23 May 2025 13:19:24 +0300 Subject: [PATCH] Don't allow unselecting paint style buttons. --- src/ui/widget/paint-selector.cpp | 3 +++ src/ui/widget/paint-selector.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ui/widget/paint-selector.cpp b/src/ui/widget/paint-selector.cpp index 5ad356bd70..fccad1112f 100644 --- a/src/ui/widget/paint-selector.cpp +++ b/src/ui/widget/paint-selector.cpp @@ -218,6 +218,9 @@ StyleToggleButton *PaintSelector::style_button_add(gchar const *pixmap, PaintSel b->set_visible(true); b->set_has_frame(false); b->set_style(mode); + if (_none) { + b->set_group(*_none); + } b->set_image_from_icon_name(pixmap, Gtk::IconSize::NORMAL); // Previously GTK_ICON_SIZE_BUTTON diff --git a/src/ui/widget/paint-selector.h b/src/ui/widget/paint-selector.h index f76eda68f6..05ccf8d21b 100644 --- a/src/ui/widget/paint-selector.h +++ b/src/ui/widget/paint-selector.h @@ -80,7 +80,7 @@ class PaintSelector : public Gtk::Box { Mode _mode; Gtk::Box *_style; - StyleToggleButton *_none; + StyleToggleButton *_none = nullptr; StyleToggleButton *_solid; StyleToggleButton *_gradient; StyleToggleButton *_radial; -- GitLab