OSDN Git Service

Fix osdn.net #42219: Reset the cache for the Automatic/Manual Unpacking/Prediffer...
authorTakashi Sawanaka <sdottaka@users.sourceforge.net>
Thu, 13 May 2021 00:05:30 +0000 (09:05 +0900)
committerTakashi Sawanaka <sdottaka@users.sourceforge.net>
Thu, 13 May 2021 00:05:30 +0000 (09:05 +0900)
Src/DirDoc.cpp
Src/PluginManager.h

index 70cd193..5092f40 100644 (file)
@@ -254,6 +254,9 @@ void CDirDoc::InitDiffContext(CDiffContext *pCtxt)
        theApp.m_pGlobalFileFilter->ReloadUpdatedFilters();
        pCtxt->m_piFilterGlobal = theApp.m_pGlobalFileFilter.get();
        
+       //Reset the cache for the Automatic/Manual Unpacking/Prediffer settings to take effect
+       m_pluginman.Reset();
+
        // All plugin management is done by our plugin manager
        pCtxt->m_piPluginInfos = GetOptionsMgr()->GetBool(OPT_PLUGINS_ENABLED) ? &m_pluginman : nullptr;
 }
index 5929c01..6f5d474 100644 (file)
@@ -29,6 +29,7 @@ public:
        typedef std::map<String, PluginFileInfoPtr> PluginFileInfoMap;
 
        ~PluginManager();
+       void Reset() { m_pluginSettings.clear(); };
        void SetPrediffSetting(const String& filteredFilenames, PLUGIN_MODE newsetting);
        void SetPrediffSettingAll(PLUGIN_MODE newsetting);
        void SetPrediffer(const String& filteredFilenames, const String& prediffer);