- Timestamp:
- 20/01/12 14:37:13 (4 months ago)
- Location:
- branches/e4fix/EDIT4
- Files:
-
- 2 modified
-
ED4_cursor.cxx (modified) (3 diffs)
-
ed4_class.hxx (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/e4fix/EDIT4/ED4_cursor.cxx
r8333 r8334 955 955 } 956 956 957 // @@@ move parts of the following section into function is_hidden_by_parent() 958 ED4_base *temp_parent = owner_of_cursor; 959 while (temp_parent->parent) { 960 temp_parent = temp_parent->parent; 961 if (temp_parent->flag.hidden) return; // don't move cursor if terminal is flag.hidden 962 } 957 if (owner_of_cursor->is_hidden()) return; // do not jump if cursor terminal is hidden 963 958 964 959 AW_pos terminal_x, terminal_y; … … 1149 1144 // move cursor up down 1150 1145 ED4_cursor_move dir = ED4_C_NONE; 1151 ED4_returncode result= ED4_R_OK;1146 ED4_returncode result = ED4_R_OK; 1152 1147 bool endHome = false; 1153 1148 … … 1161 1156 1162 1157 if (dir != ED4_C_NONE) { 1163 // don't move cursor if terminal is hidden 1164 { 1165 ED4_base *temp_parent = owner_of_cursor->parent; 1166 while (temp_parent->parent && result == ED4_R_OK) { 1167 if (temp_parent->flag.hidden) { result = ED4_R_IMPOSSIBLE; } 1168 temp_parent = temp_parent->parent; 1169 } 1170 } 1158 if (owner_of_cursor->is_hidden()) result = ED4_R_IMPOSSIBLE; // don't move cursor if terminal is hidden 1171 1159 1172 1160 if (result == ED4_R_OK) { -
branches/e4fix/EDIT4/ed4_class.hxx
r8333 r8334 1133 1133 1134 1134 ED4_group_manager *is_in_folded_group() const; 1135 virtual bool is_hidden() const = 0; 1136 1135 1137 char *get_name_of_species(); // go from terminal to name of species 1136 1138 … … 1319 1321 ED4_returncode unhide_children(); 1320 1322 1323 bool is_hidden() const { 1324 if (flag.hidden) return true; 1325 if (!parent) return false; 1326 return parent->is_hidden(); 1327 } 1328 1321 1329 ED4_manager(const ED4_objspec& spec_, const char *id, AW_pos x, AW_pos y, AW_pos width, AW_pos height, ED4_manager *parent); 1322 1330 virtual ~ED4_manager(); … … 1379 1387 void scroll_into_view(ED4_window *ed4w); 1380 1388 inline bool setCursorTo(ED4_cursor *cursor, int seq_pos, bool unfoldGroups, ED4_CursorJumpType jump_type); 1389 1390 bool is_hidden() const { return parent && parent->is_hidden(); } 1381 1391 1382 1392 ED4_terminal(const ED4_objspec& spec_, GB_CSTR id, AW_pos x, AW_pos y, AW_pos width, AW_pos height, ED4_manager *parent);
