diff --git a/installer/PowerToysSetupCustomActions/CustomAction.cpp b/installer/PowerToysSetupCustomActions/CustomAction.cpp index ece9d8da2a09..a23cfc2f6cad 100644 --- a/installer/PowerToysSetupCustomActions/CustomAction.cpp +++ b/installer/PowerToysSetupCustomActions/CustomAction.cpp @@ -75,7 +75,7 @@ UINT __stdcall ApplyModulesRegistryChangeSetsCA(MSIHANDLE hInstall) hr = getInstallFolder(hInstall, installationFolder); ExitOnFailure(hr, "Failed to get installFolder."); - for (const auto& changeSet : getAllModulesChangeSets(installationFolder)) + for (const auto& changeSet : getAllOnByDefaultModulesChangeSets(installationFolder)) { if (!changeSet.apply()) { diff --git a/src/common/utils/modulesRegistry.h b/src/common/utils/modulesRegistry.h index 06c4869f64d3..7f8631ea094d 100644 --- a/src/common/utils/modulesRegistry.h +++ b/src/common/utils/modulesRegistry.h @@ -201,6 +201,18 @@ inline registry::ChangeSet getStlThumbnailHandlerChangeSet(const std::wstring in NonLocalizable::ExtSTL); } +inline std::vector getAllOnByDefaultModulesChangeSets(const std::wstring installationDir) +{ + constexpr bool PER_USER = true; + return { getSvgPreviewHandlerChangeSet(installationDir, PER_USER), + getMdPreviewHandlerChangeSet(installationDir, PER_USER), + getMonacoPreviewHandlerChangeSet(installationDir, PER_USER), + getGcodePreviewHandlerChangeSet(installationDir, PER_USER), + getSvgThumbnailHandlerChangeSet(installationDir, PER_USER), + getGcodeThumbnailHandlerChangeSet(installationDir, PER_USER), + getStlThumbnailHandlerChangeSet(installationDir, PER_USER) }; +} + inline std::vector getAllModulesChangeSets(const std::wstring installationDir) { constexpr bool PER_USER = true; diff --git a/src/settings-ui/Settings.UI.Library/PowerPreviewProperties.cs b/src/settings-ui/Settings.UI.Library/PowerPreviewProperties.cs index adcac598c8d4..004c34af0350 100644 --- a/src/settings-ui/Settings.UI.Library/PowerPreviewProperties.cs +++ b/src/settings-ui/Settings.UI.Library/PowerPreviewProperties.cs @@ -97,7 +97,7 @@ public bool EnableMonacoPreviewWordWrap } } - private bool enablePdfPreview = true; + private bool enablePdfPreview; [JsonPropertyName("pdf-previewer-toggle-setting")] [JsonConverter(typeof(BoolPropertyJsonConverter))] @@ -114,7 +114,7 @@ public bool EnablePdfPreview } } - private bool enablePdfThumbnail = true; + private bool enablePdfThumbnail; [JsonPropertyName("pdf-thumbnail-toggle-setting")] [JsonConverter(typeof(BoolPropertyJsonConverter))]