Changeset 8347

Show
Ignore:
Timestamp:
30/01/12 17:47:08 (4 months ago)
Author:
westram
Message:
  • scrolling down completely and then increasing the height of the edit window, leaded to a useless empty area at the bottom of the window.
    • consequently an equal-sized area at top of window always remained scrolled-out.
    • bug was introduced by [8230]
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/e4fix/EDIT4/ed4_class.hxx

    r8346 r8347  
    479479        update_folding_line_positions(); 
    480480    } 
    481      
     481 
    482482    void calc_bottomRight_folding_dimensions(int area_width, int area_height) { 
    483483        AW_pos dim; 
    484         if (bottom() > area_height) { // our world doesn't fit vertically in our window 
    485             dim = bottom()-area_height; // calc dimension of bottom folding line 
     484        if (bottom() > area_height) {   // our world doesn't fit vertically in our window 
     485            dim = bottom()-area_height; // calc dimension of both horizontal folding lines 
     486            scroll_top->set_dimension(min(dim, scroll_top->get_dimension())); 
    486487            scroll_bottom->set_dimension(max(0, int(dim - scroll_top->get_dimension()))); 
    487488        } 
     
    492493        } 
    493494 
     495        // e4_assert(scroll_top->dimension >= 0); // @@@ reactivate when refresh is fixed (or better move into set_dimension) 
     496        // e4_assert(scroll_bottom->dimension >= 0); 
     497        e4_assert(dim == (scroll_top->get_dimension()+scroll_bottom->get_dimension())); 
    494498        scroll_bottom->set_pos(world.bottom()-dim); 
    495499 
    496         if (right()>area_width) { // our world doesn't fit horizontally in our window => 
    497             dim = right()-area_width; // calc dimension of right folding line 
     500        if (right()>area_width) {     // our world doesn't fit horizontally in our window 
     501            dim = right()-area_width; // calc dimension of both vertical folding lines 
     502            scroll_left->set_dimension(min(dim, scroll_left->get_dimension())); 
    498503            scroll_right->set_dimension(max(0, int(dim - scroll_left->get_dimension()))); 
    499504        } 
     
    504509        } 
    505510 
     511        // e4_assert(scroll_left->dimension >= 0); // @@@ reactivate when refresh is fixed (or better move into set_dimension) 
     512        // e4_assert(scroll_right->dimension >= 0); 
     513        e4_assert(dim == (scroll_left->get_dimension()+scroll_right->get_dimension())); 
    506514        scroll_right->set_pos(world.right()-dim); 
    507515