Skip to content
Snippets Groups Projects
Commit 37acc37d authored by Mikhail Svechnikov's avatar Mikhail Svechnikov
Browse files

update layer forms on add/move/remove

parent 63812d21
No related branches found
No related tags found
1 merge request!2277Repair LayerForm appearance
Pipeline #125588 passed
......@@ -181,8 +181,7 @@ void LayerForm::updateLayerPositionDependentElements()
m_layout->insertValue(m_thicknessRow, m_layer->thickness());
}
if (m_ec->sampleItem()->layerItems().size() < 2)
m_moveButton->setVisible(false);
m_moveButton->setVisible(m_ec->sampleItem()->layerItems().size() > 1);
}
void LayerForm::onLayoutAdded(ParticleLayoutItem* newLayoutItem)
......
......@@ -123,6 +123,7 @@ void SampleEditorController::removeLayerItem(LayerItem* layer)
emit aboutToRemoveItem(layer);
m_sampleForm->onAboutToRemoveLayer(layer);
m_sampleItem->removeLayer(layer);
m_sampleForm->updateRowVisibilities();
emit modified();
}
......
......@@ -182,8 +182,9 @@ void SampleForm::onAboutToRemoveLayer(LayerItem* layerItem)
void SampleForm::updateRowVisibilities()
{
for (auto* c : findChildren<LayerForm*>())
for (auto* c : findChildren<LayerForm*>()) {
c->updateLayerPositionDependentElements();
}
}
LayerForm* SampleForm::findNextLayerForm(QWidget* w)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment