Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
b5511d2c
Commit
b5511d2c
authored
Jun 19, 2011
by
Davis King
Browse files
Made the image list select an image near the one you removed rather than
jump to the beginning.
parent
ddaa9133
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
tools/imglab/src/metadata_editor.cpp
tools/imglab/src/metadata_editor.cpp
+6
-1
No files found.
tools/imglab/src/metadata_editor.cpp
View file @
b5511d2c
...
...
@@ -129,11 +129,14 @@ remove_selected_images()
dlib
::
queue
<
unsigned
long
>::
kernel_1a
list
;
lb_images
.
get_selected
(
list
);
list
.
reset
();
unsigned
long
min_idx
=
lb_images
.
size
();
while
(
list
.
move_next
())
{
lb_images
.
unselect
(
list
.
element
());
min_idx
=
std
::
min
(
min_idx
,
list
.
element
());
}
// remove all the selected items from metadata.images
dlib
::
static_set
<
unsigned
long
>::
kernel_1a
to_remove
;
to_remove
.
load
(
list
);
...
...
@@ -158,7 +161,9 @@ remove_selected_images()
lb_images
.
load
(
files
);
select_image
(
0
);
if
(
min_idx
!=
0
)
min_idx
--
;
select_image
(
min_idx
);
}
// ----------------------------------------------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment