some remaining map_outside_area fix in the editor,

allow to use mousewheel on wood
This commit is contained in:
Ali El Gariani 2007-07-09 06:23:15 +00:00
parent 3c010f9103
commit 0589a2c78a
2 changed files with 2 additions and 2 deletions

View file

@ -358,7 +358,7 @@ void map_editor::handle_mouse_button_event(const SDL_MouseButtonEvent &event,
const int ydisp = mousey - centery;
gui_.scroll(xdisp, ydisp);
}
if (point_in_rect(mousex, mousey, gui_.map_area())) {
if (point_in_rect(mousex, mousey, gui_.map_outside_area())) {
if (event.button == SDL_BUTTON_WHEELUP) {
scrolly = - preferences::scroll_speed();
} else if (event.button == SDL_BUTTON_WHEELDOWN) {

View file

@ -47,7 +47,7 @@ void editor_display::draw(bool update,bool force)
if(!map_.empty() && !invalidated_.empty()) {
changed = true;
SDL_Rect clip_rect = map_area();
SDL_Rect clip_rect = map_outside_area();
surface const dst(screen_.getSurface());
clip_rect_setter set_clip_rect(dst, clip_rect);