Skip to content

Commit

Permalink
properties: hide layer editor if there's only one layer
Browse files Browse the repository at this point in the history
  • Loading branch information
carrotIndustries committed Apr 24, 2021
1 parent ce726d8 commit e1ad213
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/core_properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,11 @@ void Core::layers_to_meta(PropertyMeta &meta)
{
PropertyMetaLayers &m = dynamic_cast<PropertyMetaLayers &>(meta);
m.layers.clear();
for (const auto &it : get_layer_provider().get_layers()) {
const auto &prv = get_layer_provider();
for (const auto &it : prv.get_layers()) {
m.layers.emplace(it.first, it.second);
}
m.is_visible = prv.get_layers().size() > 1;
}

void Core::get_placement(const Placement &placement, class PropertyValue &value, ObjectProperty::ID property)
Expand Down

0 comments on commit e1ad213

Please sign in to comment.