From e27c57f8a66459c132b70236ec3053f5cd3b6a3a Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 2 Jun 2022 14:58:11 +0200 Subject: [PATCH] [partition] Add FS-choice box when replacing (re-use the erase-fs configuration) --- src/modules/partition/gui/ChoicePage.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index 2730e069f..59e2c1122 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -288,6 +288,13 @@ ChoicePage::setupChoices() m_eraseFsTypesChoiceComboBox, &QComboBox::currentTextChanged, m_config, &Config::setEraseFsTypeChoice ); connect( m_config, &Config::eraseModeFilesystemChanged, this, &ChoicePage::onActionChanged ); m_eraseButton->addOptionsComboBox( m_eraseFsTypesChoiceComboBox ); + + // Also offer it for "replace + auto* box = new QComboBox; + box->addItems( m_config->eraseFsTypes() ); + connect( box, &QComboBox::currentTextChanged, m_config, &Config : setReplaceFsChoice ); + connect( m_config, &Config::replaceModeFilesystemChanged, this, &ChoicePage::onActionChanged ); + m_replaceButton->addOptionsComboBox( box ); } m_itemsLayout->addWidget( m_alongsideButton );