This commit is contained in:
luboslenco
2021-03-18 11:59:08 +01:00
parent 8b027211d5
commit 7aa41ed7eb
3 changed files with 6 additions and 6 deletions
-1
View File
@@ -521,7 +521,6 @@ class App {
MakeMaterial.parseMeshMaterial();
MakeMaterial.parsePaintMaterial();
Context.ddirty = 0;
History.reset();
if (History.undoLayers == null) {
History.undoLayers = [];
for (i in 0...Config.raw.undo_steps) {
+4 -5
View File
@@ -38,7 +38,7 @@ class Translator {
return translation;
}
// (Re)loads translations for the specified locale.
// (Re)loads translations for the specified locale
public static function loadTranslations(newLocale: String) {
if (newLocale == "system") {
Config.raw.locale = Krom.language();
@@ -50,8 +50,8 @@ class Translator {
Config.raw.locale = "en";
}
// No translations to load, as source strings are in English.
// Clear existing translations if switching languages at runtime.
// No translations to load, as source strings are in English
// Clear existing translations if switching languages at runtime
translations.clear();
if (Config.raw.locale == "en" && lastLocale == "en") {
@@ -133,14 +133,13 @@ class Translator {
for (i in 1024...1119) kha.graphics2.Graphics.fontGlyphs.push(i);
}
// Returns a list of supported locales (plus English and the automatically detected system locale).
// Returns a list of supported locales (plus English and the automatically detected system locale)
public static function getSupportedLocales(): Array<String> {
var locales = ["system", "en"];
for (localeFilename in File.readDirectory(Path.data() + Path.sep + "locale")) {
// Trim the `.json` file extension from file names
locales.push(localeFilename.substr(0, -5));
}
return locales;
}
}
+2
View File
@@ -121,6 +121,8 @@ class UISidebar {
world.envmap = Context.showEnvmap ? Context.savedEnvmap : Context.emptyEnvmap;
Context.ddirty = 1;
History.reset();
var scale = Config.raw.window_scale;
ui = new Zui( { theme: App.theme, font: App.font, scaleFactor: scale, color_wheel: App.colorWheel } );
Zui.onBorderHover = onBorderHover;