Skip to content

Commit feeed32

Browse files
committed
Window Size & Emplacement bug.
1 parent 1ecd1f4 commit feeed32

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

src/SquadMgr/SquadMgr.cpp

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ void CSquadMgr::Render()
308308
static ImU32 warnCol = IM_COL32(255, 148, 79, 255);
309309
static ImU32 errCol = IM_COL32(172, 89, 89, 255);
310310

311+
ImGui::SetNextWindowSizeConstraints(ImVec2(-1, 100), ImVec2(-1, ImGui::GetIO().DisplaySize.y / 2));
311312
if (ImGui::Begin("Squad Manager", &this->Visible, s_WndFlags))
312313
{
313314
const std::lock_guard<std::mutex> lock(this->Mutex);
@@ -527,6 +528,14 @@ void CSquadMgr::Render()
527528
else
528529
{
529530
ImGui::Text("NO DATA");
531+
532+
/* Fetch the KP data. */
533+
const std::lock_guard<std::mutex> kplock(this->KPMutex);
534+
auto it = this->KPData.find(player.Member.AccountName);
535+
if (it != this->KPData.end())
536+
{
537+
player.KPMEInfo = it->second;
538+
}
530539
}
531540
}
532541

@@ -705,7 +714,6 @@ void CSquadMgr::GetKPData(PlayerInfo_t& aPlayer)
705714
else
706715
{
707716
kpmeInfo = new KPMEInfo_t();
708-
this->Players[aAccountName].KPMEInfo = kpmeInfo;
709717
}
710718
}
711719

@@ -979,10 +987,15 @@ void CSquadMgr::OnGroupMemberLeave(RTAPI::GroupMember* aGroupMember)
979987
{
980988
this->Players.clear();
981989
}
990+
this->KPRequirement = {};
982991
}
983992
else
984993
{
985-
this->Players[aGroupMember->AccountName].HasLeft = Time::GetTimestamp();
994+
auto it = this->Players.find(aGroupMember->AccountName);
995+
if (it != this->Players.end())
996+
{
997+
this->Players[aGroupMember->AccountName].HasLeft = Time::GetTimestamp();
998+
}
986999
}
9871000
}
9881001
void CSquadMgr::OnGroupMemberUpdate(RTAPI::GroupMember* aGroupMember)

0 commit comments

Comments
 (0)