mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Open picture manager when clicking on the picture at the profile
This patch makes the click on pic == open picture browser works also on the profile instead of only on the list view.. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
259b73335f
commit
3f98f024e4
4 changed files with 18 additions and 7 deletions
|
@ -1325,16 +1325,15 @@ void ProfileWidget2::plotPictures()
|
|||
// information area.
|
||||
if (!pic->offset.seconds)
|
||||
continue;
|
||||
DivePictureItem *item = new DivePictureItem();
|
||||
DivePictureItem *item = new DivePictureItem(i);
|
||||
item->setPixmap(m->index(i,0).data(Qt::DecorationRole).value<QPixmap>());
|
||||
// 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);
|
||||
if (i == 0)
|
||||
y = 10;
|
||||
else
|
||||
if (fabs(x - lastX) < 4)
|
||||
y = lastY + 3;
|
||||
else if (fabs(x - lastX) < 4)
|
||||
y = lastY + 3;
|
||||
lastX = x;
|
||||
lastY = y;
|
||||
item->setPos(x, y);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue