Skip to content

Commit

Permalink
Don't reset zoom level every time a game is loaded (FR #25592)
Browse files Browse the repository at this point in the history
Note this doesn't apply across app sessions, but it's an improvement.
  • Loading branch information
Vultraz committed Mar 18, 2017
1 parent 64a369e commit daefe8e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/display.cpp
Expand Up @@ -78,6 +78,7 @@ namespace {
bool debug_foreground = false;
}

unsigned int display::zoom_ = DefaultZoom;
unsigned int display::last_zoom_ = SmallZoom;

void display::parse_team_overlays()
Expand Down Expand Up @@ -143,9 +144,6 @@ void display::remove_single_overlay(const map_location& loc, const std::string&
}
}




display::display(const display_context * dc, CVideo& video, std::weak_ptr<wb::manager> wb, reports & reports_object, const config& theme_cfg, const config& level, bool auto_join) :
video2::draw_layering(auto_join),
dc_(dc),
Expand All @@ -160,7 +158,6 @@ display::display(const display_context * dc, CVideo& video, std::weak_ptr<wb::ma
ypos_(0),
view_locked_(false),
theme_(theme_cfg, screen_area()),
zoom_(DefaultZoom),
zoom_index_(0),
fake_unit_man_(new fake_unit_manager(*this)),
builder_(new terrain_builder(level, &dc_->map(), theme_.border().tile_image)),
Expand Down
2 changes: 1 addition & 1 deletion src/display.hpp
Expand Up @@ -724,7 +724,7 @@ class display : public filter_context, public video2::draw_layering
int xpos_, ypos_;
bool view_locked_;
theme theme_;
unsigned int zoom_;
static unsigned int zoom_;
int zoom_index_;
static unsigned int last_zoom_;
const std::unique_ptr<fake_unit_manager> fake_unit_man_;
Expand Down

0 comments on commit daefe8e

Please sign in to comment.