diff options
author | Lioncash <mathew1800@gmail.com> | 2022-02-01 22:03:10 -0500 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2022-02-01 22:03:12 -0500 |
commit | 40d31b8b8a2ae85e0c406fe87828542ead0c6745 (patch) | |
tree | e512f41080bebef3aa3fe0b6e92cb66d391c9d9d | |
parent | b9f06bd5991d89e8f0a268b1e0f211fbc3ab449d (diff) |
configure_filesystem: Add missing changeEvent() override
This allows the dialog to be retranslated during runtime if the language
is changed.
-rw-r--r-- | src/yuzu/configuration/configure_filesystem.cpp | 8 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_filesystem.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/yuzu/configuration/configure_filesystem.cpp b/src/yuzu/configuration/configure_filesystem.cpp index 55247ebcc..d6fb43f8b 100644 --- a/src/yuzu/configuration/configure_filesystem.cpp +++ b/src/yuzu/configuration/configure_filesystem.cpp @@ -38,6 +38,14 @@ ConfigureFilesystem::ConfigureFilesystem(QWidget* parent) ConfigureFilesystem::~ConfigureFilesystem() = default; +void ConfigureFilesystem::changeEvent(QEvent* event) { + if (event->type() == QEvent::LanguageChange) { + RetranslateUI(); + } + + QWidget::changeEvent(event); +} + void ConfigureFilesystem::SetConfiguration() { ui->nand_directory_edit->setText( QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::NANDDir))); diff --git a/src/yuzu/configuration/configure_filesystem.h b/src/yuzu/configuration/configure_filesystem.h index 0c86ee445..b4f9355eb 100644 --- a/src/yuzu/configuration/configure_filesystem.h +++ b/src/yuzu/configuration/configure_filesystem.h @@ -23,6 +23,8 @@ public: void ApplyConfiguration(); private: + void changeEvent(QEvent* event) override; + void RetranslateUI(); void SetConfiguration(); |