setTargetLang not working immediately 5 Years, 11 Months ago
Hi all,
I want to change the language from one the another. The code is as follows:
MMSTranslator trans;
trans.setTargetLang(MMSLANG_DE);
But, it's not work immediately. It woks well after hide() & show() the window.
The administrator has disabled public write access.
setTargetLang not working immediately
jervis
Admin
Posts: 4
Re:setTargetLang not working immediately 5 Years, 11 Months ago
Hi Guido,
In file MMSWindow.cpp, function targetLangChanged(), line 4083, the code as follows:
####################################
// for all child windows
for (unsigned int i = 0; i < childwins.size(); i++)
childwins.at(i).window->targetLangChanged(lang, false);
####################################
Why not to change it as follows:
####################################
// for all child windows
for (unsigned int i = 0; i < childwins.size(); i++)
childwins.at(i).window->targetLangChanged(lang, refresh);
####################################
The all child windows will be refreshed. Users will not be needed to manual refresh. THX.
The administrator has disabled public write access.
setTargetLang not working immediately
Stefan
Admin
Posts: 91
Re:setTargetLang not working immediately 5 Years, 11 Months ago
Hi Jervis,
the code is allright at this function. Refreshing each childwindow individially would trigger numerous redraws. The refresh() at line 4100 should refresh the children as well.
As the default value for refresh is true, you should not need to specify anything. Obviously there is a bug in another place.
Could you post some of your code, that we ca go into the debugging?