Skip to content

Commit

Permalink
Merge remote branch 'robn/sector-view-update-on-switch'
Browse files Browse the repository at this point in the history
  • Loading branch information
tomm committed Feb 2, 2011
2 parents 1c8eb44 + fe27993 commit af99e11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/SectorView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ void SectorView::DrawSector(int sx, int sy)
}
}

void SectorView::OnSwitchTo() {
m_lastShownLoc = SysLoc(9999,9999,9999);
Update();
}

void SectorView::Update()
{
const float frameTime = Pi::GetFrameTime();
Expand Down
2 changes: 1 addition & 1 deletion src/SectorView.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class SectorView: public GenericSystemView {
void GetSector(int *outSecX, int *outSecY) const { *outSecX = m_secx; *outSecY = m_secy; }
virtual void Save(Serializer::Writer &wr);
virtual void Load(Serializer::Reader &rd);
virtual void OnSwitchTo() {}
virtual void OnSwitchTo();
private:
void DrawSector(int x, int y);
void PutClickableLabel(std::string &text, int sx, int sy, int sys_idx);
Expand Down

0 comments on commit af99e11

Please sign in to comment.