Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Don't allow users to edit anything if there's no editable layer visible #65

Merged
merged 12 commits into from
Mar 28, 2012

Conversation

pgiraud
Copy link

@pgiraud pgiraud commented Mar 26, 2012

No description provided.

if (layers.hasOwnProperty(i)) {
size++;
this.getAttributesStore(layers[i].attributes.layer_id, null, function(store, geometryType) {
menu.add(this.createMenuItem(layers[i], geometryType));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is suspicious. I think that the value of i will be the same for every load callback. Relying Ext.each should be an easy way to fix that.

@elemoine
Copy link
Contributor

It looks good. Thanks.

newFeatureBtn.setText(newFeatureBtn.initialConfig.text);
}
if (this.editorGrid &&
this.editorGrid.store.feature.attributes.__layer_id__.toString() == item.layerId) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think toString isn't necessary.

@elemoine
Copy link
Contributor

I've added a few comments. After that you can merge if the tests continue to pass.

pgiraud pushed a commit that referenced this pull request Mar 28, 2012
Don't allow users to creating new features on not-visible layers.
@pgiraud pgiraud merged commit 58c931d into camptocamp:master Mar 28, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants