]> git.sur5r.net Git - bacula/bacula/commit
Fix MediaView::getSelection
authorMarco van Wieringen <mvw@planets.elm.net>
Wed, 18 Jan 2012 19:04:53 +0000 (20:04 +0100)
committerMarco van Wieringen <mvw@planets.elm.net>
Wed, 18 Jan 2012 19:10:21 +0000 (20:10 +0100)
commitff12a420846759adc4e75a3047738b27d7ff1792
tree99bad0aad3e813ae2ab31db615d34027fea39a23
parente7b6964f6009f48d13a2a342cd850e4c97d061bc
Fix MediaView::getSelection

The selection in MediaView::getSelection doesn't work ok as
the internal table is sized using the number of selected items
and not the number of rows in the total table. But the table
is indexed using a row number which can be any rownr of the
total of the table. Things seen is that 3 rows are selected
but the selection only returns 2. This is probably a side effect
because the code could also just have crashed as nb = 16 and
rownr = 29-31 e.g. addressed outside the bounds of the array.

Changed the internal array to use bools instead of ints so
its also somewhat smaller.
bacula/src/qt-console/medialist/mediaview.cpp