Bug report #14535
fix duplicate entries in the vector menu caused by ftools on version upgrade
|Affected QGIS version:||master||Regression?:|
|Operating System:||Easy fix?:|
|Pull Request or Patch supplied:||No||Resolution:||worksforme|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||22508|
(See attached dups.png, which should make it self-explanatory)
As the plan to entirely replace ftools with processing is moving forward (wouhou!), we've now reached a point where processing vector algorithms show in the vector sub menu (yay!) to emulate the UI people are used to using ftools.
- However, when ftools is enabled (which it'll be when people upgrade from previous versions of QGIS), two sets of menus appear, one from ftools and one from processing. IMO, to fix this, we should move the ftools menus into a root "ftools" menu, that way when people update to the next version and still have ftool enabled, it'll look like this:
- ftools (within which you have Research tools, Geoprocessing tools, Geometry tools, Analysis tools, Data Management tools)
- Research tools
- Geoprocessing tools
- Analsyis tools
- Data Management tools -
Setting target to 2.16 as this needs addressing.
processing: use main vector menu translation (fixes #14535)
(cherry picked from commit 11289a0d973e6e4a3f7f81972dd08f2e6d82941e)
#9 Updated by Giovanni Manghi over 5 years ago
Mathieu Pellerin - nIRV wrote:
Alex, there is something to be fixed, look at the screenshot.
but QGIS needs to handle the plugin removal upon upgrade. Otherwise users end up with menu duplicates.
I guess that was Alex was saying is that QGIS ftools wasn't updated (at least in years) trough the plugin manager, so there is nothing to remove in .qgis2.
Do you still have this issue?
#10 Updated by Alexander Bruy over 5 years ago
Duplicate entries in menu can exist only if fTools was installed via Plugin Manager or manually. When you update QGIS, installer removes existing files and extracts new files. I can't reproduce this upgrading 2.8 and 2.14 to master, in both cases I have no duplicates, fTools was removed from QGIS installation directory.
#12 Updated by Alain FERRATON over 5 years ago
- File vector_menu3.png added
- File vector_menu2.png added
- File vector_menu1.png added
- Status changed from Closed to Reopened
In the English version I have a single vector menu with two items 'geometry tools'
But in the French version there are two separate vectors menus.
#15 Updated by Arnaud Morvan over 5 years ago
- Status changed from Closed to Reopened
Note that processing vector menu entries are stored in settings after translation. So this is not completely resolved.
Menu entries should be stored in english and translated at render time (when creating menus and actions).
For pylupdate4 to catch string, we could do like for algorithm names and groups, example :
vectorMenu = 'Vect&or'
i18n_vectorMenu = Processing.tr('Vect&or')
I will propose a pull request for that.
#16 Updated by Arnaud Morvan over 5 years ago
- Status changed from Reopened to Closed
Storing menu entries in english is not a good solution as users will edit them in their language.
I also note that the option dialog to configure menus is not really user friendly and it is really easy to make typo in submenu names.
#17 Updated by Arnaud Morvan over 5 years ago
For those who wants to reset affected vector menu entries :
from processing.core.alglist import algList from processing.gui.menus import defaultMenuEntries from processing.core.ProcessingConfig import ProcessingConfig for provider in algList.providers: for alg in provider.algs: default = defaultMenuEntries.get(alg.commandLineName(), "") ProcessingConfig.setSettingValue("MENU_" + alg.commandLineName(), default)
and restart QGIS
#18 Updated by Arnaud Morvan about 5 years ago
The translation have been re-corrupted by another translator after my correction.
So this have corrupted user settings with 2.16 release.
I've just proposed a Pull Request adding an reset menus button in processing config : https://github.com/qgis/QGIS/pull/3415