| 4137 | bool UIManagedTreeListType::moveUpByAmt(int number_up, bool do_refresh) |
| 4138 | { |
| 4139 | if (!current_node) |
| 4140 | { |
| 4141 | return false; |
| 4142 | } |
| 4143 | // |
| 4144 | // Move the active node to the |
| 4145 | // current active node's previous |
| 4146 | // sibling |
| 4147 | // |
| 4148 | |
| 4149 | GenericTree *new_node = current_node->prevSibling(number_up, visual_order); |
| 4150 | if (new_node) |
| 4151 | { |
| 4152 | current_node = new_node; |
| 4153 | if (do_refresh) |
| 4154 | { |
| 4155 | if (show_whole_tree) |
| 4156 | { |
| 4157 | for(int i = active_bin; i <= bins; i++) |
| 4158 | { |
| 4159 | emit requestUpdate(screen_corners[i]); |
| 4160 | } |
| 4161 | } |
| 4162 | else |
| 4163 | { |
| 4164 | refresh(); |
| 4165 | } |
| 4166 | } |
| 4167 | emit nodeEntered(current_node->getInt(), current_node->getAttributes()); |
| 4168 | current_node->becomeSelectedChild(); |
| 4169 | return true; |
| 4170 | } |
| 4171 | return false; |
| 4172 | } |
| 4173 | |
| 4212 | bool UIManagedTreeListType::moveDownByAmt(int number_down, bool do_refresh) |
| 4213 | { |
| 4214 | if (!current_node) |
| 4215 | { |
| 4216 | return false; |
| 4217 | } |
| 4218 | |
| 4219 | // |
| 4220 | // Move the active node to the |
| 4221 | // current active node's next |
| 4222 | // sibling |
| 4223 | // |
| 4224 | |
| 4225 | GenericTree *new_node = current_node->nextSibling(number_down, visual_order); |
| 4226 | if (new_node) |
| 4227 | { |
| 4228 | current_node = new_node; |
| 4229 | if (do_refresh) |
| 4230 | { |
| 4231 | if (show_whole_tree) |
| 4232 | { |
| 4233 | for(int i = active_bin; i <= bins; i++) |
| 4234 | { |
| 4235 | emit requestUpdate(screen_corners[i]); |
| 4236 | } |
| 4237 | } |
| 4238 | else |
| 4239 | { |
| 4240 | refresh(); |
| 4241 | } |
| 4242 | } |
| 4243 | emit nodeEntered(current_node->getInt(), current_node->getAttributes()); |
| 4244 | current_node->becomeSelectedChild(); |
| 4245 | return true; |
| 4246 | } |
| 4247 | return false; |
| 4248 | } |
| 4249 | |