mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Implement the functionality of remove_picture.
Added the remove_picture functionality, with code shamelessy stolen from remove_event, and hoock it up with the interface. Fixes #650 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
1e6986d870
commit
3b9bceacb6
6 changed files with 32 additions and 8 deletions
|
@ -1352,7 +1352,9 @@ void ProfileWidget2::keyEscAction()
|
|||
|
||||
void ProfileWidget2::plotPictures()
|
||||
{
|
||||
qDeleteAll(pictures);
|
||||
Q_FOREACH(DivePictureItem *item, pictures){
|
||||
item->deleteLater();
|
||||
}
|
||||
pictures.clear();
|
||||
|
||||
if (printMode)
|
||||
|
@ -1368,7 +1370,7 @@ void ProfileWidget2::plotPictures()
|
|||
continue;
|
||||
DivePictureItem *item = new DivePictureItem();
|
||||
item->setPixmap(m->index(i,0).data(Qt::DecorationRole).value<QPixmap>());
|
||||
item->setFileUrl(m->index(i,0).data(Qt::DisplayPropertyRole).toString());
|
||||
item->setFileUrl(m->index(i,1).data().toString());
|
||||
// let's put the picture at the correct time, but at a fixed "depth" on the profile
|
||||
// not sure this is ideal, but it seems to look right.
|
||||
x = timeAxis->posAtValue(pic->offset.seconds);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue