From d039fef4f13b90babe86fe82e6d013dfcc183ce3 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Sun, 29 Sep 2024 07:35:20 -0500 Subject: [PATCH] Ensure edit line dialog reset button resets dialog to proper defaults --- .../alert_palette_settings_widget.cpp | 36 +++++++++---------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/scwx-qt/source/scwx/qt/ui/settings/alert_palette_settings_widget.cpp b/scwx-qt/source/scwx/qt/ui/settings/alert_palette_settings_widget.cpp index 9775b9c8..5d974225 100644 --- a/scwx-qt/source/scwx/qt/ui/settings/alert_palette_settings_widget.cpp +++ b/scwx-qt/source/scwx/qt/ui/settings/alert_palette_settings_widget.cpp @@ -249,27 +249,25 @@ void AlertPaletteSettingsWidget::Impl::AddPhenomenonLine( self_->AddSettingsCategory(&lineSettings); - connect( - toolButton, - &QAbstractButton::clicked, - self_, - [this, lineLabel, &lineSettings]() - { - // Set the active line label for when the dialog is finished - activeLineSettings_ = &lineSettings; + connect(toolButton, + &QAbstractButton::clicked, + self_, + [this, lineLabel, &lineSettings]() + { + // Set the active line label for when the dialog is finished + activeLineSettings_ = &lineSettings; - // Initialize dialog with current line settings - editLineDialog_->set_border_color(lineLabel->border_color()); - editLineDialog_->set_highlight_color(lineLabel->highlight_color()); - editLineDialog_->set_line_color(lineLabel->line_color()); + // Initialize dialog with current line settings + editLineDialog_->Initialize(lineLabel->border_color(), + lineLabel->highlight_color(), + lineLabel->line_color(), + lineLabel->border_width(), + lineLabel->highlight_width(), + lineLabel->line_width()); - editLineDialog_->set_border_width(lineLabel->border_width()); - editLineDialog_->set_highlight_width(lineLabel->highlight_width()); - editLineDialog_->set_line_width(lineLabel->line_width()); - - // Show the dialog - editLineDialog_->show(); - }); + // Show the dialog + editLineDialog_->show(); + }); } } // namespace ui