diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-10-18 10:13:59 +0200 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-10-18 10:13:59 +0200 |
| commit | 3c1f206d7d29d3b3d27082aca23dafd87a95a71b (patch) | |
| tree | c37431a1f0ab1b8f095e75baec2a48525816a18f | |
| parent | 7762c1f53a52932ad4e4d9c76d54a62a0ee56d91 (diff) | |
Always call onPluginSettingChanged and onUserInterfaceInitialized callbacks.
| -rw-r--r-- | src/organizerproxy.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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<void(const QString&)>& f bool OrganizerProxy::onUserInterfaceInitialized(std::function<void(QMainWindow*)> 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<void(MOBase::IProfile*, MOBase::IProfile*)> const& func)
@@ -288,5 +289,6 @@ bool OrganizerProxy::onProfileChanged(std::function<void(MOBase::IProfile*, MOBa bool OrganizerProxy::onPluginSettingChanged(std::function<void(QString const&, const QString& key, const QVariant&, const QVariant&)> 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);
}
|
