Changeset 8354 for branches

Show
Ignore:
Timestamp:
02/02/12 12:14:10 (4 months ago)
Author:
westram
Message:
  • removed extra sync in ED4_resize_cb (syncronize slider positions between AW_window and ED4_window is done by update_scrolled_rectangle() since [8353])
  • removed special handling of 1st call to ED4_expose_cb()
    • seems to work
    • no idea why, but this fixes an ancient bug (when properties were saved in folded mode aka "hide all gaps", the horizontal scrollbar size was wrong on startup and it was possible to scroll far out into the void. After toggling folding the behavior disappeared)
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/e4fix/EDIT4/ED4_no_class.cxx

    r8348 r8354  
    127127 
    128128void ED4_expose_cb(AW_window *aww, AW_CL /*cd1*/, AW_CL /*cd2*/) { 
    129     static bool dummy = 0; 
    130  
    131129    ED4_LocalWinContext uses(aww); 
    132  
    133     GB_push_transaction(GLOBAL_gb_main); 
    134  
    135     if (!dummy) { 
    136         dummy = 1; 
    137     } 
    138     else { 
    139         ED4_expose_recalculations(); // this case is needed every time, except the first 
    140         current_ed4w()->update_scrolled_rectangle(); 
    141     } 
    142  
    143     current_ed4w()->update_window_coords(); 
     130    GB_transaction      ta(GLOBAL_gb_main); 
     131 
     132    ED4_expose_recalculations(); 
     133    current_ed4w()->update_scrolled_rectangle(); 
    144134 
    145135    current_device()->reset(); 
    146136    ED4_ROOT->special_window_refresh(); 
    147  
    148     GB_pop_transaction(GLOBAL_gb_main); 
    149137} 
    150138 
    151139void ED4_resize_cb(AW_window *aww, AW_CL /*cd1*/, AW_CL /*cd2*/) { 
    152140    ED4_LocalWinContext uses(aww); 
    153  
    154     GB_push_transaction(GLOBAL_gb_main); 
     141    GB_transaction      ta(GLOBAL_gb_main); 
    155142 
    156143    current_device()->reset(); 
    157  
    158144    current_ed4w()->update_scrolled_rectangle(); 
    159  
    160     current_ed4w()->slider_pos_horizontal = aww->slider_pos_horizontal; 
    161     current_ed4w()->slider_pos_vertical  = aww->slider_pos_vertical; 
    162  
    163     GB_pop_transaction(GLOBAL_gb_main); 
    164145} 
    165146