PartDesign: Fillet/chamger/draft/thickness: change the button strings to 'Preview' and 'Select'

This commit is contained in:
Paddle
2023-03-25 06:36:56 +01:00
parent de6038ff9b
commit 18a9c164d6
6 changed files with 10 additions and 4 deletions

View File

@@ -175,7 +175,7 @@ void TaskChamferParameters::onCheckBoxUseAllEdgesToggled(bool checked)
void TaskChamferParameters::setButtons(const selectionModes mode)
{
ui->buttonRefSel->setChecked(mode == refSel);
ui->buttonRefSel->setText(mode == refSel ? tr("End selection") : tr("Start selection"));
ui->buttonRefSel->setText(mode == refSel ? btnPreviewStr : btnSelectStr);
}
void TaskChamferParameters::onRefDeleted()

View File

@@ -165,7 +165,7 @@ void TaskDraftParameters::onSelectionChanged(const Gui::SelectionChanges& msg)
void TaskDraftParameters::setButtons(const selectionModes mode)
{
ui->buttonRefSel->setText(mode == refSel ? tr("End selection") : tr("Start selection"));
ui->buttonRefSel->setText(mode == refSel ? btnPreviewStr : btnSelectStr);
ui->buttonRefSel->setChecked(mode == refSel);
ui->buttonLine->setChecked(mode == line);
ui->buttonPlane->setChecked(mode == plane);

View File

@@ -51,6 +51,9 @@ FC_LOG_LEVEL_INIT("PartDesign",true,true)
using namespace PartDesignGui;
using namespace Gui;
const QString TaskDressUpParameters::btnPreviewStr = tr("Preview");
const QString TaskDressUpParameters::btnSelectStr = tr("Select");
/* TRANSLATOR PartDesignGui::TaskDressUpParameters */
TaskDressUpParameters::TaskDressUpParameters(ViewProviderDressUp *DressUpView, bool selectEdges, bool selectFaces, QWidget *parent)

View File

@@ -99,6 +99,9 @@ protected:
bool allowFaces, allowEdges;
selectionModes selectionMode;
int transactionID;
static const QString btnPreviewStr;
static const QString btnSelectStr;
};
/// simulation dialog for the TaskView

View File

@@ -128,7 +128,7 @@ void TaskFilletParameters::onCheckBoxUseAllEdgesToggled(bool checked)
void TaskFilletParameters::setButtons(const selectionModes mode)
{
ui->buttonRefSel->setChecked(mode == refSel);
ui->buttonRefSel->setText(mode == refSel ? tr("End selection") : tr("Start selection"));
ui->buttonRefSel->setText(mode == refSel ? btnPreviewStr : btnSelectStr);
}
void TaskFilletParameters::onRefDeleted()

View File

@@ -131,7 +131,7 @@ void TaskThicknessParameters::onSelectionChanged(const Gui::SelectionChanges& ms
void TaskThicknessParameters::setButtons(const selectionModes mode)
{
ui->buttonRefSel->setChecked(mode == refSel);
ui->buttonRefSel->setText(mode == refSel ? tr("End selection") : tr("Start selection"));
ui->buttonRefSel->setText(mode == refSel ? btnPreviewStr : btnSelectStr);
}
void TaskThicknessParameters::onRefDeleted(void)