From 0db5b6d3d85cc3dac2d4e835be6ed4c38d0a90ef Mon Sep 17 00:00:00 2001 From: Waldi Ravens Date: Wed, 22 Jan 2020 23:01:29 +0100 Subject: [PATCH] Fix HashFromDlg title bar localization issue Fix #7884, close #7885 --- PowerEditor/src/MISC/md5/md5Dlgs.cpp | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/PowerEditor/src/MISC/md5/md5Dlgs.cpp b/PowerEditor/src/MISC/md5/md5Dlgs.cpp index fa3929dbb..002fedc7f 100644 --- a/PowerEditor/src/MISC/md5/md5Dlgs.cpp +++ b/PowerEditor/src/MISC/md5/md5Dlgs.cpp @@ -181,18 +181,20 @@ void HashFromFilesDlg::setHashType(hashType hashType2set) void HashFromFilesDlg::doDialog(bool isRTL) { if (!isCreated()) + { create(IDD_HASHFROMFILES_DLG, isRTL); - if (_ht == hash_sha256) - { - generic_string title = TEXT("Generate SHA-256 digest from files"); - ::SetWindowText(_hSelf, title.c_str()); + if (_ht == hash_sha256) + { + generic_string title = TEXT("Generate SHA-256 digest from files"); + ::SetWindowText(_hSelf, title.c_str()); - generic_string buttonText = TEXT("Choose files to generate SHA-256..."); - ::SetDlgItemText(_hSelf, IDC_HASH_FILEBROWSER_BUTTON, buttonText.c_str()); + generic_string buttonText = TEXT("Choose files to generate SHA-256..."); + ::SetDlgItemText(_hSelf, IDC_HASH_FILEBROWSER_BUTTON, buttonText.c_str()); + } } - // Adjust the position in the center + // Adjust the position in the center goToCenter(); }; @@ -382,14 +384,16 @@ void HashFromTextDlg::setHashType(hashType hashType2set) void HashFromTextDlg::doDialog(bool isRTL) { if (!isCreated()) + { create(IDD_HASHFROMTEXT_DLG, isRTL); - if (_ht == hash_sha256) - { - generic_string title = TEXT("Generate SHA-256 digest"); - ::SetWindowText(_hSelf, title.c_str()); + if (_ht == hash_sha256) + { + generic_string title = TEXT("Generate SHA-256 digest"); + ::SetWindowText(_hSelf, title.c_str()); + } } - // Adjust the position in the center + // Adjust the position in the center goToCenter(); };