Bug report #6920

Edit session only enabled for last selected layer

Added by Nathan Woodrow over 7 years ago. Updated over 1 year ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Map Legend
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:16038

Description

If a set of layers are highlighted in the layer list pressing the editing button only enables the last layer selected for editing.

It would be nice to have this ability to quickly enable a set of layers for editing rather then going through one by one.

History

#1 Updated by Larry Shaffer over 7 years ago

Hi Nathan,

Is this a bug or feature request? Gonna assume the latter, since I've never seen the functionality before (unless I'm missing something).

I can add this pretty quickly as a single extra command in the contextual menu, when there are changeable vector layers within the selection. I see it showing up right below the Toggle Editing action, maybe as Toggle Editing for Selected.

Running the action might loop through the changeable vector layers and apply the same function as Toggle Editing, but not toggling off (skipping) any layer that has unsaved edits, resulting in a notification dialog that says something like:

"Some layers have unsaved edits and were not toggled off."

Then, list the layers. I have a similar listing integrated with project close dialog (working on it now), as per your suggestion.

Alternatively, Toggle Editing for Selected could have a submenu with On, Off (and maybe Toggle?) actions to allow the user to specifically control the functionality.

The only issue I know of is that QgisApp::toggleEditing(QgsMapLayer*) is a private slot, so either a special signal or a QMetaObject needs set up to fire it for not-active-layer layers. Not sure why it can not just be a public slot, or have a wrapper public member. (Ran into this just yesterday, trying to fix another issue.)

#2 Updated by Jürgen Fischer about 6 years ago

  • Target version changed from Version 2.0.0 to Future Release - Lower Priority

#3 Updated by Giovanni Manghi over 3 years ago

  • Easy fix? set to No
  • Regression? set to No

#4 Updated by Giovanni Manghi over 1 year ago

  • Resolution set to end of life
  • Status changed from Open to Closed

Also available in: Atom PDF