Skip to content
Snippets Groups Projects

Repair LayerForm appearance

Merged Mikhail Svechnikov requested to merge m.sigma into main
2 files
+ 12
0
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -117,6 +117,8 @@ void SampleForm::onLayerAdded(LayerItem* layerItem)
// same row => button is above!
m_layout->insertWidget(rowInLayout, new AddLayerWidget(this, layerItem, m_ec), 0, Qt::AlignTop);
updateRowVisibilities();
}
void SampleForm::onLayerMoved(LayerItem* layerItem)
@@ -148,6 +150,8 @@ void SampleForm::onLayerMoved(LayerItem* layerItem)
// same row => button is above!
m_layout->insertWidget(rowInLayout, al, 0, Qt::AlignTop);
updateRowVisibilities();
}
void SampleForm::onAboutToRemoveLayer(LayerItem* layerItem)
@@ -176,6 +180,12 @@ void SampleForm::onAboutToRemoveLayer(LayerItem* layerItem)
delete addLayerWidget;
}
void SampleForm::updateRowVisibilities()
{
for (auto* c : findChildren<LayerForm*>())
c->updateLayerPositionDependentElements();
}
LayerForm* SampleForm::findNextLayerForm(QWidget* w)
{
while (w != nullptr && dynamic_cast<LayerForm*>(w) == nullptr) {
Loading