Delete SGUIMessage GUIM_SETTINGS_UPDATED broadcasts redundant with the broadcast initiated from SetSetting from e21ebb37f5
.
659a9ea57a
introduced the call rightfully in ShowTooltip since CTooltip::SetupText() depends on the just changed _mousepos setting. But then0382cdd9b1
moved that _mousepos SetSetting call, resulting in the message becoming redundant; and it inserted the second redundant message in HideTooltip. These were the only redundant SGUIMessage HandleMessage calls. This was SVN commit r22790.
This commit is contained in:
parent
92b6cdfeab
commit
0a6b650189
@ -143,13 +143,10 @@ void GUITooltip::ShowTooltip(IGUIObject* obj, const CPos& pos, const CStr& style
|
||||
|
||||
GUI<bool>::SetSetting(usedobj, "hidden", false);
|
||||
|
||||
const CStrW& text = obj->GetSetting<CStrW>(m_IsIconTooltip ? "_icon_tooltip" : "tooltip");
|
||||
const CStrW& text = obj->GetSetting<CStrW>(m_IsIconTooltip ? "_icon_tooltip" : "tooltip");
|
||||
|
||||
if (usedobj->SetSetting("caption", text) != PSRETURN_OK)
|
||||
debug_warn(L"Failed to set tooltip caption");
|
||||
|
||||
SGUIMessage msg(GUIM_SETTINGS_UPDATED, "caption");
|
||||
usedobj->HandleMessage(msg);
|
||||
}
|
||||
|
||||
void GUITooltip::HideTooltip(const CStr& style, CGUI& pGUI)
|
||||
@ -175,10 +172,8 @@ void GUITooltip::HideTooltip(const CStr& style, CGUI& pGUI)
|
||||
}
|
||||
|
||||
usedobj->SetSetting("caption", L"");
|
||||
SGUIMessage msg(GUIM_SETTINGS_UPDATED, "caption");
|
||||
usedobj->HandleMessage(msg);
|
||||
|
||||
if (tooltipobj->GetSetting<bool>("hide_object"))
|
||||
if (tooltipobj->GetSetting<bool>("hide_object"))
|
||||
GUI<bool>::SetSetting(usedobj, "hidden", true);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user