1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 11:19:10 +00:00

Fix pfLocalizationDataMgr's SetElementPlainTextData to work properly

without a database re-load.
This commit is contained in:
2014-04-12 20:29:00 -07:00
parent f6d04e78c8
commit f0ed701d8f
2 changed files with 6 additions and 2 deletions

View File

@ -116,6 +116,9 @@ void EditDialog::SaveLocalizationText()
plString ageName, setName, elementName, elementLanguage;
SplitLocalizationPath(fCurrentLocPath, ageName, setName, elementName, elementLanguage);
if (ageName.IsEmpty() || setName.IsEmpty() || elementName.IsEmpty() || elementLanguage.IsEmpty())
return;
plString name = plString::Format("%s.%s.%s", ageName.c_str(), setName.c_str(), elementName.c_str());
pfLocalizationDataMgr::Instance().SetElementPlainTextData(name, elementLanguage, text);
}
@ -351,7 +354,7 @@ void EditDialog::DeleteClicked()
QMessageBox::critical(this, tr("Error"), tr("Couldn't delete localization!"));
else
{
plString path = fCurrentLocPath;
plString path = key + ".English";
fCurrentLocPath = "";
fUI->fLocalizationTree->clear();
fUI->fLocalizationTree->LoadData(path);