Gui: Stop remember state expression dialog
Before this commit, the expression dialog remembered the state of whether the varset information should be shown. This is removed according to #17075.
This commit is contained in:
@@ -53,9 +53,6 @@ using namespace Gui::Dialog;
|
||||
|
||||
FC_LOG_LEVEL_INIT("DlgExpressionInput", true, true)
|
||||
|
||||
|
||||
bool DlgExpressionInput::varSetsVisible = false;
|
||||
|
||||
DlgExpressionInput::DlgExpressionInput(const App::ObjectIdentifier & _path,
|
||||
std::shared_ptr<const Expression> _expression,
|
||||
const Base::Unit & _impliedUnit, QWidget *parent)
|
||||
@@ -66,6 +63,7 @@ DlgExpressionInput::DlgExpressionInput(const App::ObjectIdentifier & _path,
|
||||
, discarded(false)
|
||||
, impliedUnit(_impliedUnit)
|
||||
, minimumWidth(10)
|
||||
, varSetsVisible(false)
|
||||
{
|
||||
assert(path.getDocumentObject());
|
||||
|
||||
@@ -225,15 +223,11 @@ void DlgExpressionInput::initializeVarSets()
|
||||
std::vector<App::VarSet*> varSets = getAllVarSets();
|
||||
if (!varSets.empty() && typeOkForVarSet()) {
|
||||
ui->checkBoxVarSets->setVisible(true);
|
||||
ui->checkBoxVarSets->setCheckState(varSetsVisible ? Qt::Checked : Qt::Unchecked);
|
||||
ui->groupBoxVarSets->setVisible(varSetsVisible);
|
||||
if (varSetsVisible) {
|
||||
setupVarSets();
|
||||
}
|
||||
ui->checkBoxVarSets->setCheckState(Qt::Unchecked);
|
||||
ui->groupBoxVarSets->setVisible(false);
|
||||
}
|
||||
else {
|
||||
// The dialog is shown without any VarSet options.
|
||||
varSetsVisible = false;
|
||||
ui->checkBoxVarSets->setVisible(false);
|
||||
ui->groupBoxVarSets->setVisible(false);
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ private:
|
||||
|
||||
int minimumWidth;
|
||||
|
||||
static bool varSetsVisible;
|
||||
bool varSetsVisible;
|
||||
std::unique_ptr<QTreeWidget> treeWidget;
|
||||
QPushButton* okBtn = nullptr;
|
||||
QPushButton* discardBtn = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user