Fix bug in Dialog piece path. Dialog was blocked if piece path is internal

path.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-02-13 19:37:45 +02:00
parent 1199adf6e4
commit 551d11f298

View File

@ -92,6 +92,7 @@ void DialogPiecePath::EnbleShowMode(bool disable)
m_showMode = disable; m_showMode = disable;
ui->comboBoxType->setDisabled(m_showMode); ui->comboBoxType->setDisabled(m_showMode);
ui->comboBoxPiece->setDisabled(m_showMode); ui->comboBoxPiece->setDisabled(m_showMode);
ValidObjects(PathIsValid());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -199,7 +200,13 @@ void DialogPiecePath::CheckState()
SCASSERT(bOk != nullptr); SCASSERT(bOk != nullptr);
if (GetType() != PiecePathType::InternalPath) if (GetType() != PiecePathType::InternalPath)
{// Works only for internal paths {// Works only for internal paths
m_flagFormulaVisible = true; m_flagFormulaVisible = true;
}
else
{
flagFormula = true;
m_flagFormulaBefore = true;
m_flagFormulaAfter = true;
} }
bOk->setEnabled(flagName && flagError && flagFormula && m_flagFormulaBefore && m_flagFormulaAfter bOk->setEnabled(flagName && flagError && flagFormula && m_flagFormulaBefore && m_flagFormulaAfter