diff options
Diffstat (limited to 'src/gui/partywindow.cpp')
-rw-r--r-- | src/gui/partywindow.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/partywindow.cpp b/src/gui/partywindow.cpp index c13a0810..d9ba5a63 100644 --- a/src/gui/partywindow.cpp +++ b/src/gui/partywindow.cpp @@ -42,6 +42,7 @@ PartyWindow::PartyWindow() : Window(_("Party")) setDefaultSize(620, 300, 110, 200); loadWindowState(); + setVisible(false); // Do not start out visible } PartyWindow::~PartyWindow() @@ -72,8 +73,8 @@ PartyMember *PartyWindow::findOrCreateMember(int id) { member = new PartyMember; member->avatar = new Avatar(""); - add(member->avatar, 0, (mMembers.size() - 1) * 14); mMembers[id] = member; + add(member->avatar, 0, (mMembers.size() - 1) * 14); } return member; @@ -99,9 +100,7 @@ int PartyWindow::findMember(const std::string &name) const void PartyWindow::updateMember(int id, const std::string &memberName, bool leader, bool online) { - // create new party member PartyMember *player = findOrCreateMember(id); - player->id = id; player->name = memberName; player->leader = leader; player->online = online; @@ -189,3 +188,10 @@ void PartyWindow::action(const gcn::ActionEvent &event) mPartyInviter = ""; } } + +void PartyWindow::clear() +{ + Window::clear(); + + mMembers.clear(); +} |