FIX: fix issue STUDIO-480 associate files problem

Change-Id: I348778349c0786c1b9388305c9290c62a24c30f1
(cherry picked from commit dd35e2a5bfdb107f973eb11a40b72b7e9a494e73)
This commit is contained in:
zhimin.zeng 2022-07-26 16:24:36 +08:00 committed by Lane.Wei
parent 3e5d660a37
commit 13bd9ca445
1 changed files with 9 additions and 2 deletions

View File

@ -4820,8 +4820,15 @@ void GUI_App::disassociate_files(std::wstring extend)
bool is_new = false;
is_new |= del_win_registry(HKEY_CURRENT_USER, reg_extension.c_str(), prog_id.c_str());
bool is_associate_3mf = app_config->get("associate_3mf") == "true";
bool is_associate_stl = app_config->get("associate_stl") == "true";
bool is_associate_step = app_config->get("associate_step") == "true";
if (!is_associate_3mf && !is_associate_stl && !is_associate_step)
{
is_new |= del_win_registry(HKEY_CURRENT_USER, reg_prog_id.c_str(), prog_desc.c_str());
is_new |= del_win_registry(HKEY_CURRENT_USER, reg_prog_id_command.c_str(), prog_command.c_str());
}
if (is_new)
::SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, nullptr, nullptr);