+ if translation of group is done do not overwrite

This commit is contained in:
wmayer 2015-09-20 17:00:21 +02:00
parent 433efbc115
commit ee59f1263c
3 changed files with 18 additions and 9 deletions

View File

@ -94,10 +94,13 @@ DlgCustomCommandsImp::DlgCustomCommandsImp( QWidget* parent )
QString text = qApp->translate(it->second->className(), it->second->getGroupName());
GroupMap::iterator jt;
jt = std::find_if(groupMap.begin(), groupMap.end(), GroupMap_find(group));
if (jt != groupMap.end())
jt->second = text;
else
if (jt != groupMap.end()) {
if (jt->second.isEmpty())
jt->second = text;
}
else {
groupMap.push_back(std::make_pair(group, text));
}
}
QStringList labels; labels << tr("Category");

View File

@ -86,10 +86,13 @@ DlgCustomKeyboardImp::DlgCustomKeyboardImp( QWidget* parent )
QString text = qApp->translate(it->second->className(), it->second->getGroupName());
GroupMap::iterator jt;
jt = std::find_if(groupMap.begin(), groupMap.end(), GroupMap_find(group));
if (jt != groupMap.end())
jt->second = text;
else
if (jt != groupMap.end()) {
if (jt->second.isEmpty())
jt->second = text;
}
else {
groupMap.push_back(std::make_pair(group, text));
}
}
int index = 0;

View File

@ -93,10 +93,13 @@ DlgCustomToolbars::DlgCustomToolbars(DlgCustomToolbars::Type t, QWidget* parent)
QString text = qApp->translate(it->second->className(), it->second->getGroupName());
GroupMap::iterator jt;
jt = std::find_if(groupMap.begin(), groupMap.end(), GroupMap_find(group));
if (jt != groupMap.end())
jt->second = text;
else
if (jt != groupMap.end()) {
if (jt->second.isEmpty())
jt->second = text;
}
else {
groupMap.push_back(std::make_pair(group, text));
}
}
int index = 0;