Fix language reload: hasattr('mode') → hasattr('_mode'), val.mode → val._mode
BaseBridge stores mode as self._mode, not self.mode — so the reload loop never found any bridges and language switching did nothing.
This commit is contained in:
+2
-2
@@ -2261,9 +2261,9 @@ def _reload_all_panel_langs():
|
|||||||
for key, val in list(sc.sticky.items()):
|
for key, val in list(sc.sticky.items()):
|
||||||
if (key.endswith("_bridge") or key.endswith("_bridge_ref")) \
|
if (key.endswith("_bridge") or key.endswith("_bridge_ref")) \
|
||||||
and hasattr(val, "_wv") and val._wv is not None \
|
and hasattr(val, "_wv") and val._wv is not None \
|
||||||
and hasattr(val, "mode"):
|
and hasattr(val, "_mode"):
|
||||||
try:
|
try:
|
||||||
panel_base.load_inline(val._wv, val.mode)
|
panel_base.load_inline(val._wv, val._mode)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
print("[TOOLBAR] reload_lang ({}): {}".format(key, ex))
|
print("[TOOLBAR] reload_lang ({}): {}".format(key, ex))
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
|
|||||||
Reference in New Issue
Block a user