| 492 | // ---------------------------------------------------------------------------------------- |
| 493 | |
| 494 | void metadata_editor:: |
| 495 | select_image( |
| 496 | unsigned long idx |
| 497 | ) |
| 498 | { |
| 499 | if (idx < lb_images.size()) |
| 500 | { |
| 501 | // unselect all currently selected images |
| 502 | dlib::queue<unsigned long>::kernel_1a list; |
| 503 | lb_images.get_selected(list); |
| 504 | list.reset(); |
| 505 | while (list.move_next()) |
| 506 | { |
| 507 | lb_images.unselect(list.element()); |
| 508 | } |
| 509 | |
| 510 | |
| 511 | lb_images.select(idx); |
| 512 | load_image(idx); |
| 513 | } |
| 514 | else if (lb_images.size() == 0) |
| 515 | { |
| 516 | display.clear_overlay(); |
| 517 | array2d<unsigned char> empty_img; |
| 518 | display.set_image(empty_img); |
| 519 | } |
| 520 | } |
| 521 | |
| 522 | // ---------------------------------------------------------------------------------------- |
| 523 |
nothing calls this directly
no test coverage detected