Improve dialog Piece path. Hide unused tabs depending on path type.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-02-13 19:43:32 +02:00
parent 551d11f298
commit 7b3ab26832
3 changed files with 8 additions and 0 deletions

View File

@ -95,6 +95,12 @@ void DialogPiecePath::EnbleShowMode(bool disable)
ValidObjects(PathIsValid());
}
//---------------------------------------------------------------------------------------------------------------------
void DialogPiecePath::HideVisibilityTrigger()
{
ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tabControl));
}
//---------------------------------------------------------------------------------------------------------------------
void DialogPiecePath::ChosenObject(quint32 id, const SceneObject &type)
{

View File

@ -44,6 +44,7 @@ public:
virtual ~DialogPiecePath();
void EnbleShowMode(bool disable);
void HideVisibilityTrigger();
VPiecePath GetPiecePath() const;
void SetPiecePath(const VPiecePath &path);

View File

@ -704,6 +704,7 @@ void DialogSeamAllowance::ShowCustomSAContextMenu(const QPoint &pos)
{
dialog->SetFormulaSAWidth(GetFormulaSAWidth());
}
dialog->HideVisibilityTrigger();
dialog->EnbleShowMode(true);
m_dialog = dialog;
m_dialog->setModal(true);