aboutsummaryrefslogtreecommitdiffstats
path: root/.gitmodules
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-07-14 17:40:24 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-07-18 09:06:37 -0700
commitc5f66c5538d149aaab92316096070fcb01cf8f1b (patch)
treeddc208dac40450a9c7791ca8218d9772c3ea450d /.gitmodules
parent8ff7314b219d2eab85f7777e470091a76cf25107 (diff)
downloadsubsurface-c5f66c5538d149aaab92316096070fcb01cf8f1b.tar.gz
Dive media: transport dive-id in drag'n'drop events
9efb56e2d43161d952efb444d1f13d87bfdd45b5 introduced rather complex logic for picture drag'n'drop events onto the profile. Among other things, the code had to check whether the picture actually belongs to the displayed dive. This can be simplified by transporting the dive-id in the drag'n'drop event structure. The flow goes like this: DivePictureModel--(1)-->DivePictureWidget--(2)-->ProfileWidget For (1), we can use the Qt::UserRole role. This was used to transport the picture-offset, but this is not needed anymore since ProfileWidget was decoupled from DivePictureModel. For (2), we simply replace the "position" value, which was never used. Why would the receiver care which pixel was pressed in the media-tab? This commit also contains a minor cleanup in DivePictureWidget: QListView::mousePressEvent(event) was called in both branches of an if and can therefore be removed from the if. This is so trivial, that it doesn't warrant its own commit. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to '.gitmodules')
0 files changed, 0 insertions, 0 deletions