Fix hollow thickness UI

master
Jeremy Hu 2019-08-18 22:48:55 +09:30
parent 9ed4c29b39
commit 85f1251082
4 changed files with 14 additions and 1 deletions

View File

@ -973,6 +973,7 @@ DocumentWindow::DocumentWindow() :
connect(m_document, &Document::partColorStateChanged, partTreeWidget, &PartTreeWidget::partColorStateChanged);
connect(m_document, &Document::partCutRotationChanged, partTreeWidget, &PartTreeWidget::partCutRotationChanged);
connect(m_document, &Document::partCutFaceChanged, partTreeWidget, &PartTreeWidget::partCutFaceChanged);
connect(m_document, &Document::partHollowThicknessChanged, partTreeWidget, &PartTreeWidget::partHollowThicknessChanged);
connect(m_document, &Document::partMaterialIdChanged, partTreeWidget, &PartTreeWidget::partMaterialIdChanged);
connect(m_document, &Document::partColorSolubilityChanged, partTreeWidget, &PartTreeWidget::partColorSolubilityChanged);
connect(m_document, &Document::partRemoved, partTreeWidget, &PartTreeWidget::partRemoved);

View File

@ -992,6 +992,17 @@ void PartTreeWidget::partCutFaceChanged(QUuid partId)
widget->updateCutRotationButton();
}
void PartTreeWidget::partHollowThicknessChanged(QUuid partId)
{
auto item = m_partItemMap.find(partId);
if (item == m_partItemMap.end()) {
qDebug() << "Part item not found:" << partId;
return;
}
PartWidget *widget = (PartWidget *)itemWidget(item->second, 0);
widget->updateCutRotationButton();
}
void PartTreeWidget::partMaterialIdChanged(QUuid partId)
{
auto item = m_partItemMap.find(partId);

View File

@ -66,6 +66,7 @@ public slots:
void partColorStateChanged(QUuid partId);
void partCutRotationChanged(QUuid partId);
void partCutFaceChanged(QUuid partId);
void partHollowThicknessChanged(QUuid partId);
void partMaterialIdChanged(QUuid partId);
void partColorSolubilityChanged(QUuid partId);
void partChecked(QUuid partId);

View File

@ -237,7 +237,7 @@ public:
}
bool cutAdjusted() const
{
return cutRotationAdjusted() || cutFaceAdjusted();
return cutRotationAdjusted() || cutFaceAdjusted() || hollowThicknessAdjusted();
}
bool materialAdjusted() const
{