Bug report #5030

Incorrect layer CRS is shown when opening CRS selector more than once (recently used list is cycling)

Added by Alister Hood over 8 years ago. Updated over 8 years ago.

Status:Closed
Priority:High
Assignee:-
Category:GUI
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:14805

Description

There are four CRSs in my list of "Recently used" CRSs.
- If I open the CRS selector on a particular layer (e.g. by right-clicking on it and choosing "Set layer CRS"), the layer's current CRS is highlighted in the "Recently used" list.
- If I click "cancel" and open the CRS selector again, the layer's current CRS has moved to the bottom of the "Recently used" list, and the layer at the top of the list is highlighted.
- If I click "cancel" and open the CRS selector again, that layer has moved to the bottom of the list and the next layer is highlighted.
- etc.

Associated revisions

History

#1 Updated by Alister Hood over 8 years ago

  • Priority changed from Normal to High

Actually, I think this should probably be "High Priority" - it is pretty bad showing the wrong CRS!

#2 Updated by Giovanni Manghi over 8 years ago

Hi Alister, I'm running qgis-master on Ubuntu and I don't have the issue.

#3 Updated by Alister Hood over 8 years ago

Interesting.
It didn't seem like an issue that's likely to be Windows-only.

There are four CRSs in my list of "Recently used" CRSs.

For the record, I've now checked. When the list is full it doesn't make any difference - it still cycles through.

#4 Updated by Giovanni Manghi over 8 years ago

  • Status changed from Open to In Progress

This issue has been addressed here at the developer meeting and Juergen and Richard came out with a solution that should solve this and a few other problems. Wait a while and try qgis master/1.8

#5 Updated by Alister Hood over 8 years ago

OK, this is partly fixed, but there is still a nasty bug.

If a layer's CRS is not in the list of recently used CRSs, if you right-click on the layer and choose "set layer CRS", the first item in the list of CRSs is selected. If you click OK, that CRS is applied to the layer. I can see two options for fixing this:

1. if the layer's CRS is not in the list of recently used CRSs, add it. This way the list would be the most recently viewed CRSs.

2. if the layer's CRS is not in the list of recently used CRSs, don't select anything in the list. This way the list would be the most recently applied CRSs.
But for this to be consistent more changes would be required as well:
Currently when you do "set layer CRS" for a layer with a CRS in the recently used list, then click "cancel", the CRS is moved to the bottom of the list. But it should only be moved to the bottom of the list if you click "OK", not "Cancel". Similarly, when you do "set layer CRS" and select a new CRS and then click "Cancel", the CRS is added to the bottom of the recently used list. It should not be.

#6 Updated by Giovanni Manghi over 8 years ago

Alister Hood wrote:

OK, this is partly fixed, but there is still a nasty bug.

If a layer's CRS is not in the list of recently used CRSs, if you right-click on the layer and choose "set layer CRS", the first item in the list of CRSs is selected. If you click OK, that CRS is applied to the layer. I can see two options for fixing this:

1. if the layer's CRS is not in the list of recently used CRSs, add it. This way the list would be the most recently viewed CRSs.

2. if the layer's CRS is not in the list of recently used CRSs, don't select anything in the list. This way the list would be the most recently applied CRSs.
But for this to be consistent more changes would be required as well:
Currently when you do "set layer CRS" for a layer with a CRS in the recently used list, then click "cancel", the CRS is moved to the bottom of the list. But it should only be moved to the bottom of the list if you click "OK", not "Cancel". Similarly, when you do "set layer CRS" and select a new CRS and then click "Cancel", the CRS is added to the bottom of the recently used list. It should not be.

it is just my opinion, but I don't see this as a blocker but certainly something to be fixed.

If you enter the "set layer crs" dialog is because you want to change the CRS to the layer. If the crs you need is not listed in the "recently used CRSs" then you have the filter. If you click "cancel" the CRS is not changed regardless what was selected.

#7 Updated by Alister Hood over 8 years ago

Giovanni Manghi wrote:

Alister Hood wrote:

OK, this is partly fixed, but there is still a nasty bug.

If a layer's CRS is not in the list of recently used CRSs, if you right-click on the layer and choose "set layer CRS", the first item in the list of CRSs is selected. If you click OK, that CRS is applied to the layer. I can see two options for fixing this:

1. if the layer's CRS is not in the list of recently used CRSs, add it. This way the list would be the most recently viewed CRSs.

2. if the layer's CRS is not in the list of recently used CRSs, don't select anything in the list. This way the list would be the most recently applied CRSs.
But for this to be consistent more changes would be required as well:
Currently when you do "set layer CRS" for a layer with a CRS in the recently used list, then click "cancel", the CRS is moved to the bottom of the list. But it should only be moved to the bottom of the list if you click "OK", not "Cancel". Similarly, when you do "set layer CRS" and select a new CRS and then click "Cancel", the CRS is added to the bottom of the recently used list. It should not be.

it is just my opinion, but I don't see this as a blocker but certainly something to be fixed.

If you enter the "set layer crs" dialog is because you want to change the CRS to the layer.

More often than not I enter the dialog just to see what the layer's CRS is. I think there will be plenty of others like me.

If the crs you need is not listed in the "recently used CRSs" then you have the filter. If you click "cancel" the CRS is not changed regardless what was selected.

But
1) if the user just wanted to see what the layer CRS is, and doesn't know about this bug , then they will assume that the CRS that is selected in the dialog is correct (so they might go and do some geoprocessing with the layer and get confused when they don't get the results they expect), and
2) they will assume that if they don't select another CRS the "cancel" and the "OK" buttons will have the same effect (which would be correct if this bug didn't exist), so they won't take care to click "cancel".

#8 Updated by Leyan Ouyang over 8 years ago

Alister Hood wrote:

Giovanni Manghi wrote:

If you enter the "set layer crs" dialog is because you want to change the CRS to the layer.

More often than not I enter the dialog just to see what the layer's CRS is. I think there will be plenty of others like me.

I agree, I do the same all the time.

#9 Updated by Jürgen Fischer over 8 years ago

  • Status changed from In Progress to Closed

Also available in: Atom PDF