From 3c1f206d7d29d3b3d27082aca23dafd87a95a71b Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Sun, 18 Oct 2020 10:13:59 +0200 Subject: Always call onPluginSettingChanged and onUserInterfaceInitialized callbacks. --- src/organizerproxy.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/organizerproxy.cpp b/src/organizerproxy.cpp index 05011e80..2932e6bf 100644 --- a/src/organizerproxy.cpp +++ b/src/organizerproxy.cpp @@ -278,7 +278,8 @@ bool OrganizerProxy::onModInstalled(const std::function& f bool OrganizerProxy::onUserInterfaceInitialized(std::function const& func) { - return m_Proxied->onUserInterfaceInitialized(MOShared::callIfPluginActive(this, func)); + // Always call this one to allow plugin to initialize themselves even when not active: + return m_Proxied->onUserInterfaceInitialized(func); } bool OrganizerProxy::onProfileChanged(std::function const& func) @@ -288,5 +289,6 @@ bool OrganizerProxy::onProfileChanged(std::function const& func) { - return m_Proxied->onPluginSettingChanged(MOShared::callIfPluginActive(this, func)); + // Always call this one, otherwise plugin cannot detect they are being enabled / disabled: + return m_Proxied->onPluginSettingChanged(func); } -- cgit v1.3.1