Allowing all QGIS workspace layers to be editable at once
up vote
4
down vote
favorite
I stumbled upon an odd behaviour of layers in QGIS 3.4 brought from PostGIS. The first layers I brought to the project are always editable together when clicking the Toggle Edit-button, but some of the other layers are editable only when separately selected. These layers have been brought to the project afterwards. I have tested this in 3.4.0 and 3.4.2. with Windows (as QGS and QGZ). Also when the same project was used by others in their own environment, all the layers had to be separately changed to editable. This causes problems because there are relations between the tables and you have to know what tables should be editable. How can I make all the layers editable at once?
Edit: Noticed that when the same layers are brought to a new project, they have to be clicked editable one at a time. I have used Project Generator tool to create the layers and some of the relations between the layers.
qgis layers editing
New contributor
add a comment |
up vote
4
down vote
favorite
I stumbled upon an odd behaviour of layers in QGIS 3.4 brought from PostGIS. The first layers I brought to the project are always editable together when clicking the Toggle Edit-button, but some of the other layers are editable only when separately selected. These layers have been brought to the project afterwards. I have tested this in 3.4.0 and 3.4.2. with Windows (as QGS and QGZ). Also when the same project was used by others in their own environment, all the layers had to be separately changed to editable. This causes problems because there are relations between the tables and you have to know what tables should be editable. How can I make all the layers editable at once?
Edit: Noticed that when the same layers are brought to a new project, they have to be clicked editable one at a time. I have used Project Generator tool to create the layers and some of the relations between the layers.
qgis layers editing
New contributor
1
Welcome to GIS.SE! Are the layers brought afterwards from the same PostGIS DB? If so, did you try to check Automatically create transaction groups where possible under Project > Project Properties > Data Sources ?
– Jochen Schwarze
7 hours ago
Yes, the layers are from the same database but the first ones were brought with QGIS Project Generator tool (that also brought the relations) the other layers were brought afterwards through normal add layer method. The transaction groups is by default checked. The most bizarre thing is that the same project (qgs) behaves differently in other setup with our client. But we'll have to check if they have that button checked.
– Sanna Jokela
4 hours ago
add a comment |
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I stumbled upon an odd behaviour of layers in QGIS 3.4 brought from PostGIS. The first layers I brought to the project are always editable together when clicking the Toggle Edit-button, but some of the other layers are editable only when separately selected. These layers have been brought to the project afterwards. I have tested this in 3.4.0 and 3.4.2. with Windows (as QGS and QGZ). Also when the same project was used by others in their own environment, all the layers had to be separately changed to editable. This causes problems because there are relations between the tables and you have to know what tables should be editable. How can I make all the layers editable at once?
Edit: Noticed that when the same layers are brought to a new project, they have to be clicked editable one at a time. I have used Project Generator tool to create the layers and some of the relations between the layers.
qgis layers editing
New contributor
I stumbled upon an odd behaviour of layers in QGIS 3.4 brought from PostGIS. The first layers I brought to the project are always editable together when clicking the Toggle Edit-button, but some of the other layers are editable only when separately selected. These layers have been brought to the project afterwards. I have tested this in 3.4.0 and 3.4.2. with Windows (as QGS and QGZ). Also when the same project was used by others in their own environment, all the layers had to be separately changed to editable. This causes problems because there are relations between the tables and you have to know what tables should be editable. How can I make all the layers editable at once?
Edit: Noticed that when the same layers are brought to a new project, they have to be clicked editable one at a time. I have used Project Generator tool to create the layers and some of the relations between the layers.
qgis layers editing
qgis layers editing
New contributor
New contributor
edited 2 hours ago
Andy
872314
872314
New contributor
asked 7 hours ago
Sanna Jokela
214
214
New contributor
New contributor
1
Welcome to GIS.SE! Are the layers brought afterwards from the same PostGIS DB? If so, did you try to check Automatically create transaction groups where possible under Project > Project Properties > Data Sources ?
– Jochen Schwarze
7 hours ago
Yes, the layers are from the same database but the first ones were brought with QGIS Project Generator tool (that also brought the relations) the other layers were brought afterwards through normal add layer method. The transaction groups is by default checked. The most bizarre thing is that the same project (qgs) behaves differently in other setup with our client. But we'll have to check if they have that button checked.
– Sanna Jokela
4 hours ago
add a comment |
1
Welcome to GIS.SE! Are the layers brought afterwards from the same PostGIS DB? If so, did you try to check Automatically create transaction groups where possible under Project > Project Properties > Data Sources ?
– Jochen Schwarze
7 hours ago
Yes, the layers are from the same database but the first ones were brought with QGIS Project Generator tool (that also brought the relations) the other layers were brought afterwards through normal add layer method. The transaction groups is by default checked. The most bizarre thing is that the same project (qgs) behaves differently in other setup with our client. But we'll have to check if they have that button checked.
– Sanna Jokela
4 hours ago
1
1
Welcome to GIS.SE! Are the layers brought afterwards from the same PostGIS DB? If so, did you try to check Automatically create transaction groups where possible under Project > Project Properties > Data Sources ?
– Jochen Schwarze
7 hours ago
Welcome to GIS.SE! Are the layers brought afterwards from the same PostGIS DB? If so, did you try to check Automatically create transaction groups where possible under Project > Project Properties > Data Sources ?
– Jochen Schwarze
7 hours ago
Yes, the layers are from the same database but the first ones were brought with QGIS Project Generator tool (that also brought the relations) the other layers were brought afterwards through normal add layer method. The transaction groups is by default checked. The most bizarre thing is that the same project (qgs) behaves differently in other setup with our client. But we'll have to check if they have that button checked.
– Sanna Jokela
4 hours ago
Yes, the layers are from the same database but the first ones were brought with QGIS Project Generator tool (that also brought the relations) the other layers were brought afterwards through normal add layer method. The transaction groups is by default checked. The most bizarre thing is that the same project (qgs) behaves differently in other setup with our client. But we'll have to check if they have that button checked.
– Sanna Jokela
4 hours ago
add a comment |
2 Answers
2
active
oldest
votes
up vote
4
down vote
What @jochen-schwarze suggested, should work but if needed, you can put all vector layers that have been opened in the project to edit mode with the following code in QGIS 3:
layers = QgsProject.instance().mapLayers()
for layer in layers.values():
if isinstance(layer, QgsVectorLayer) and not layer.isEditable():
layer.startEditing()
1
Thank you @orienteerix :) I think we have a workaround for this now. But still a bit baffled how to get some of the layers to the transactiongroup suggested by Jochen. But we can do this now! Thank you all!
– Sanna Jokela
3 hours ago
add a comment |
up vote
3
down vote
There is a chunk of code here - Set layer in edit mode in QGIS processing that may help. You can either put that in the Plugins/Python Counsel (Ctrl+Alt+P) or possibly write a small plugin with a button that launches this.
Click on the little "Show Editor" button paste your code and save it. Then run it with the green run button.
I am not sure if there is a plug-in for that specifically but you could look at the Digitizing Tools Plug-in and see if you can select more than one layer and set those to Edit.
Thank you @caryhutchinson, we shall see if there is some help on this and report here (I have not used Python console my self, but my colleague can help)!
– Sanna Jokela
3 hours ago
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
What @jochen-schwarze suggested, should work but if needed, you can put all vector layers that have been opened in the project to edit mode with the following code in QGIS 3:
layers = QgsProject.instance().mapLayers()
for layer in layers.values():
if isinstance(layer, QgsVectorLayer) and not layer.isEditable():
layer.startEditing()
1
Thank you @orienteerix :) I think we have a workaround for this now. But still a bit baffled how to get some of the layers to the transactiongroup suggested by Jochen. But we can do this now! Thank you all!
– Sanna Jokela
3 hours ago
add a comment |
up vote
4
down vote
What @jochen-schwarze suggested, should work but if needed, you can put all vector layers that have been opened in the project to edit mode with the following code in QGIS 3:
layers = QgsProject.instance().mapLayers()
for layer in layers.values():
if isinstance(layer, QgsVectorLayer) and not layer.isEditable():
layer.startEditing()
1
Thank you @orienteerix :) I think we have a workaround for this now. But still a bit baffled how to get some of the layers to the transactiongroup suggested by Jochen. But we can do this now! Thank you all!
– Sanna Jokela
3 hours ago
add a comment |
up vote
4
down vote
up vote
4
down vote
What @jochen-schwarze suggested, should work but if needed, you can put all vector layers that have been opened in the project to edit mode with the following code in QGIS 3:
layers = QgsProject.instance().mapLayers()
for layer in layers.values():
if isinstance(layer, QgsVectorLayer) and not layer.isEditable():
layer.startEditing()
What @jochen-schwarze suggested, should work but if needed, you can put all vector layers that have been opened in the project to edit mode with the following code in QGIS 3:
layers = QgsProject.instance().mapLayers()
for layer in layers.values():
if isinstance(layer, QgsVectorLayer) and not layer.isEditable():
layer.startEditing()
edited 2 hours ago
answered 3 hours ago
Orienteerix
348211
348211
1
Thank you @orienteerix :) I think we have a workaround for this now. But still a bit baffled how to get some of the layers to the transactiongroup suggested by Jochen. But we can do this now! Thank you all!
– Sanna Jokela
3 hours ago
add a comment |
1
Thank you @orienteerix :) I think we have a workaround for this now. But still a bit baffled how to get some of the layers to the transactiongroup suggested by Jochen. But we can do this now! Thank you all!
– Sanna Jokela
3 hours ago
1
1
Thank you @orienteerix :) I think we have a workaround for this now. But still a bit baffled how to get some of the layers to the transactiongroup suggested by Jochen. But we can do this now! Thank you all!
– Sanna Jokela
3 hours ago
Thank you @orienteerix :) I think we have a workaround for this now. But still a bit baffled how to get some of the layers to the transactiongroup suggested by Jochen. But we can do this now! Thank you all!
– Sanna Jokela
3 hours ago
add a comment |
up vote
3
down vote
There is a chunk of code here - Set layer in edit mode in QGIS processing that may help. You can either put that in the Plugins/Python Counsel (Ctrl+Alt+P) or possibly write a small plugin with a button that launches this.
Click on the little "Show Editor" button paste your code and save it. Then run it with the green run button.
I am not sure if there is a plug-in for that specifically but you could look at the Digitizing Tools Plug-in and see if you can select more than one layer and set those to Edit.
Thank you @caryhutchinson, we shall see if there is some help on this and report here (I have not used Python console my self, but my colleague can help)!
– Sanna Jokela
3 hours ago
add a comment |
up vote
3
down vote
There is a chunk of code here - Set layer in edit mode in QGIS processing that may help. You can either put that in the Plugins/Python Counsel (Ctrl+Alt+P) or possibly write a small plugin with a button that launches this.
Click on the little "Show Editor" button paste your code and save it. Then run it with the green run button.
I am not sure if there is a plug-in for that specifically but you could look at the Digitizing Tools Plug-in and see if you can select more than one layer and set those to Edit.
Thank you @caryhutchinson, we shall see if there is some help on this and report here (I have not used Python console my self, but my colleague can help)!
– Sanna Jokela
3 hours ago
add a comment |
up vote
3
down vote
up vote
3
down vote
There is a chunk of code here - Set layer in edit mode in QGIS processing that may help. You can either put that in the Plugins/Python Counsel (Ctrl+Alt+P) or possibly write a small plugin with a button that launches this.
Click on the little "Show Editor" button paste your code and save it. Then run it with the green run button.
I am not sure if there is a plug-in for that specifically but you could look at the Digitizing Tools Plug-in and see if you can select more than one layer and set those to Edit.
There is a chunk of code here - Set layer in edit mode in QGIS processing that may help. You can either put that in the Plugins/Python Counsel (Ctrl+Alt+P) or possibly write a small plugin with a button that launches this.
Click on the little "Show Editor" button paste your code and save it. Then run it with the green run button.
I am not sure if there is a plug-in for that specifically but you could look at the Digitizing Tools Plug-in and see if you can select more than one layer and set those to Edit.
answered 4 hours ago
Cary Hutchinson
587
587
Thank you @caryhutchinson, we shall see if there is some help on this and report here (I have not used Python console my self, but my colleague can help)!
– Sanna Jokela
3 hours ago
add a comment |
Thank you @caryhutchinson, we shall see if there is some help on this and report here (I have not used Python console my self, but my colleague can help)!
– Sanna Jokela
3 hours ago
Thank you @caryhutchinson, we shall see if there is some help on this and report here (I have not used Python console my self, but my colleague can help)!
– Sanna Jokela
3 hours ago
Thank you @caryhutchinson, we shall see if there is some help on this and report here (I have not used Python console my self, but my colleague can help)!
– Sanna Jokela
3 hours ago
add a comment |
Sanna Jokela is a new contributor. Be nice, and check out our Code of Conduct.
Sanna Jokela is a new contributor. Be nice, and check out our Code of Conduct.
Sanna Jokela is a new contributor. Be nice, and check out our Code of Conduct.
Sanna Jokela is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Geographic Information Systems Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f305804%2fallowing-all-qgis-workspace-layers-to-be-editable-at-once%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Welcome to GIS.SE! Are the layers brought afterwards from the same PostGIS DB? If so, did you try to check Automatically create transaction groups where possible under Project > Project Properties > Data Sources ?
– Jochen Schwarze
7 hours ago
Yes, the layers are from the same database but the first ones were brought with QGIS Project Generator tool (that also brought the relations) the other layers were brought afterwards through normal add layer method. The transaction groups is by default checked. The most bizarre thing is that the same project (qgs) behaves differently in other setup with our client. But we'll have to check if they have that button checked.
– Sanna Jokela
4 hours ago