View Issue Details

IDProjectCategoryView StatusLast Update
0016302ScribusUser Interfacepublic2020-11-07 14:52
Reporterale Assigned Toale  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.5.6.svn 
Target VersionFixed in Version1.5.6.svn 
Summary0016302: addMenuStringToMenuBar() does not use the menu label in the menu
Descriptioncurrently addMenuStringToMenuBar() is using the key instead of the value...

you notice it, because the scripter menu does not have the accelerator on the s
TagsNo tags attached.
PatchYes

Activities

ale

2020-11-02 09:37

manager  

menu-plugin-accelerator.diff (462 bytes)
diff --git a/scribus/menumanager.cpp b/scribus/menumanager.cpp
index 9aba0a47c..f2f831007 100644
--- a/scribus/menumanager.cpp
+++ b/scribus/menumanager.cpp
@@ -119,7 +119,7 @@ bool MenuManager::addMenuStringToMenuBarBefore(const QString &menuName, const QS
 	}
 	if (beforeAct)
 	{
-		auto *m=new QMenu(menuName);
+		auto *m=new QMenu(menuStringTexts[menuName]);
 		scribusMenuBar->insertMenu(beforeAct, m);
 		menuBarMenus.insert(menuName, m);
 		retVal=true;

ale

2020-11-02 09:43

manager   ~0048287

btw, there is not really a need to check if menuName is in menuStringTexts.

each time a menu is created both menuName and menuString is inserted, a menuStringTexts is also inserted.
and we are checking for menuString

if there is a risk of having them out of sync, i guess that the solution would be to have one single map with both the list of strings and the stringText in there. since they never should be out of sync!

jghali

2020-11-03 10:10

administrator   ~0048307

Patch applied!

Issue History

Date Modified Username Field Change
2020-11-02 09:37 ale New Issue
2020-11-02 09:37 ale File Added: menu-plugin-accelerator.diff
2020-11-02 09:43 ale Note Added: 0048287
2020-11-03 10:10 jghali Summary [PATCH] addMenuStringToMenuBar() does not use the menu label in the menu => addMenuStringToMenuBar() does not use the menu label in the menu
2020-11-03 10:10 jghali Assigned To => ale
2020-11-03 10:10 jghali Status new => resolved
2020-11-03 10:10 jghali Resolution open => fixed
2020-11-03 10:10 jghali Fixed in Version => 1.5.6.svn
2020-11-03 10:10 jghali Note Added: 0048307
2020-11-07 14:52 cbradney Status resolved => closed