diff --git a/include/TGUI/Signal.hpp b/include/TGUI/Signal.hpp index 1aca71bb..ca5be74d 100644 --- a/include/TGUI/Signal.hpp +++ b/include/TGUI/Signal.hpp @@ -798,18 +798,7 @@ namespace tgui /// /// @return True when a connection with this id existed and was removed ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - bool disconnect(unsigned int id) - { - auto it = m_connectedSignals.find(id); - if (it != m_connectedSignals.end()) - { - const bool ret = getSignal(it->second).disconnect(id); - m_connectedSignals.erase(it); - return ret; - } - else // The id was not found - return false; - } + bool disconnect(unsigned int id); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/TGUI/Signal.cpp b/src/TGUI/Signal.cpp index f67fa32e..144d5a14 100644 --- a/src/TGUI/Signal.cpp +++ b/src/TGUI/Signal.cpp @@ -360,6 +360,21 @@ namespace tgui ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + bool SignalWidgetBase::disconnect(unsigned int id) + { + auto it = m_connectedSignals.find(id); + if (it != m_connectedSignals.end()) + { + const bool ret = getSignal(it->second).disconnect(id); + m_connectedSignals.erase(it); + return ret; + } + else // The id was not found + return false; + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + void SignalWidgetBase::disconnectAll(std::string signalName) { return getSignal(toLower(std::move(signalName))).disconnectAll();