Changeset 8265 for trunk

Show
Ignore:
Timestamp:
30/11/11 12:15:57 (6 months ago)
Author:
westram
Message:
  • removed unused, experimental code (limiting the height of the top-area in EDIT4)
Location:
trunk/EDIT4
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/EDIT4/ED4_base.cxx

    r8133 r8265  
    12411241 
    12421242    ED4_multi_species_manager *multi_species_manager = NULL; 
    1243  
    1244  
    1245 #if defined(LIMIT_TOP_AREA_SPACE) 
    1246     int nr_of_visible_species   = 0; 
    1247     int nr_of_children_in_group = 0; 
    1248     ED4_AREA_LEVEL level = temp_parent->get_area_level(&multi_species_manager); 
    1249     if (level==ED4_A_TOP_AREA || level==ED4_A_BOTTOM_AREA) { // check if there are any unfolding restrictions 
    1250         nr_of_visible_species = multi_species_manager->count_visible_children(); 
    1251  
    1252         if (nr_of_visible_species >= MAX_TOP_AREA_SIZE) { 
    1253             aw_message("Top area limited to " MAX_TOP_AREA_SIZE " species\n" 
    1254                        "Advice: Move group to main area and try again"); 
    1255             return ED4_R_IMPOSSIBLE; 
    1256         } 
    1257  
    1258         nr_of_children_in_group = temp_parent->get_defined_level(ED4_L_MULTI_SPECIES)->to_multi_species_manager()->count_visible_children(); 
    1259  
    1260         if (nr_of_children_in_group + nr_of_visible_species - 1 > MAX_TOP_AREA_SIZE) { 
    1261             aw_message("Top area limited to " MAX_TOP_AREA_SIZE " species\n" 
    1262                        "Advice: Move group to main area and try again"); 
    1263             return ED4_R_IMPOSSIBLE; 
    1264         } 
    1265     } 
    1266 #else // LIMIT_TOP_AREA_SPACE 
    12671243    temp_parent->get_area_level(&multi_species_manager); 
    1268 #endif 
    12691244 
    12701245    for (i=0; i < temp_parent->children->members(); i++) { 
  • trunk/EDIT4/ED4_manager.cxx

    r8264 r8265  
    510510    ED4_extension        loc; 
    511511 
    512 #if defined(LIMIT_TOP_AREA_SPACE) 
    513     int nr_of_visible_species   = 0; 
    514     int nr_of_children_in_group = 0; 
    515 #endif 
    516  
    517512    if ((mi == NULL) || (mi->object->spec->level <= spec->level)) { 
    518513        return (ED4_R_IMPOSSIBLE); 
     
    551546 
    552547        old_parent = object->parent; 
    553  
    554 #if defined(LIMIT_TOP_AREA_SPACE) 
    555         if (old_parent->get_area_level() != level) { // when moving between two different areas we have to 
    556             if (level == ED4_A_TOP_AREA || level == ED4_A_BOTTOM_AREA) { // check restrictions 
    557                 nr_of_visible_species = multi_species_manager->count_visible_children(); 
    558  
    559                 if (nr_of_visible_species >= MAX_TOP_AREA_SIZE) { 
    560                     return ED4_R_IMPOSSIBLE; 
    561                 } 
    562  
    563                 if (object->is_group_manager()) { 
    564                     ED4_group_manager *group_manager = object->to_group_manager(); 
    565  
    566                     if (object->dynamic_prop & ED4_P_IS_FOLDED) { 
    567                         nr_of_children_in_group = 1; 
    568                     } 
    569                     else { 
    570                         nr_of_children_in_group = group_manager->get_defined_level(ED4_L_MULTI_SPECIES)->to_multi_species_manager()->count_visible_children(); 
    571                     } 
    572  
    573                     if (nr_of_children_in_group + nr_of_visible_species > MAX_TOP_AREA_SIZE) { 
    574                         return ED4_R_IMPOSSIBLE; 
    575                     } 
    576                 } 
    577             } 
    578         } 
    579 #endif // LIMIT_TOP_AREA_SPACE 
    580548 
    581549        x_off = 0; 
  • trunk/EDIT4/ed4_class.hxx

    r8264 r8265  
    1010#ifdef DEBUG 
    1111# define IMPLEMENT_DUMP         // comment out this line to skip compilation of the dump() methods 
    12 #endif 
    13  
    14 // #define LIMIT_TOP_AREA_SPACE // // if defined, top area is size-limited // @@@ remove this 
    15 #ifdef LIMIT_TOP_AREA_SPACE 
    16 #define MAX_TOP_AREA_SIZE 10    // size limit for top-area 
    1712#endif 
    1813