PD: fix crash on Windows when loading PD workbench
This commit is contained in:
@@ -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 ? btnPreviewStr : btnSelectStr);
|
||||
ui->buttonRefSel->setText(mode == refSel ? btnPreviewStr() : btnSelectStr());
|
||||
}
|
||||
|
||||
void TaskChamferParameters::onRefDeleted()
|
||||
|
||||
@@ -165,7 +165,7 @@ void TaskDraftParameters::onSelectionChanged(const Gui::SelectionChanges& msg)
|
||||
|
||||
void TaskDraftParameters::setButtons(const selectionModes mode)
|
||||
{
|
||||
ui->buttonRefSel->setText(mode == refSel ? btnPreviewStr : btnSelectStr);
|
||||
ui->buttonRefSel->setText(mode == refSel ? btnPreviewStr() : btnSelectStr());
|
||||
ui->buttonRefSel->setChecked(mode == refSel);
|
||||
ui->buttonLine->setChecked(mode == line);
|
||||
ui->buttonPlane->setChecked(mode == plane);
|
||||
|
||||
@@ -51,8 +51,6 @@ 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 */
|
||||
|
||||
@@ -81,6 +79,18 @@ TaskDressUpParameters::~TaskDressUpParameters()
|
||||
Gui::Selection().rmvSelectionGate();
|
||||
}
|
||||
|
||||
const QString TaskDressUpParameters::btnPreviewStr()
|
||||
{
|
||||
static const QString text{ tr("Preview") };
|
||||
return text;
|
||||
}
|
||||
|
||||
const QString TaskDressUpParameters::btnSelectStr()
|
||||
{
|
||||
static const QString text{ tr("Select") };
|
||||
return text;
|
||||
}
|
||||
|
||||
void TaskDressUpParameters::setupTransaction()
|
||||
{
|
||||
if (!DressUpView)
|
||||
|
||||
@@ -100,8 +100,8 @@ protected:
|
||||
selectionModes selectionMode;
|
||||
int transactionID;
|
||||
|
||||
static const QString btnPreviewStr;
|
||||
static const QString btnSelectStr;
|
||||
static const QString btnPreviewStr();
|
||||
static const QString btnSelectStr();
|
||||
};
|
||||
|
||||
/// simulation dialog for the TaskView
|
||||
|
||||
@@ -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 ? btnPreviewStr : btnSelectStr);
|
||||
ui->buttonRefSel->setText(mode == refSel ? btnPreviewStr() : btnSelectStr());
|
||||
}
|
||||
|
||||
void TaskFilletParameters::onRefDeleted()
|
||||
|
||||
@@ -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 ? btnPreviewStr : btnSelectStr);
|
||||
ui->buttonRefSel->setText(mode == refSel ? btnPreviewStr() : btnSelectStr());
|
||||
}
|
||||
|
||||
void TaskThicknessParameters::onRefDeleted(void)
|
||||
|
||||
Reference in New Issue
Block a user