Changeset View
Changeset View
Standalone View
Standalone View
lib/redeyereduction/redeyereductiontool.cpp
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Line(s) | 113 | { | |||
---|---|---|---|---|---|
128 | RedEyeReductionImageOperation::apply(&img, imgRectF); | 128 | RedEyeReductionImageOperation::apply(&img, imgRectF); | ||
129 | 129 | | |||
130 | const QRectF viewRectF = imageView()->mapToView(docRectF); | 130 | const QRectF viewRectF = imageView()->mapToView(docRectF); | ||
131 | painter->drawImage(viewRectF, img, imgRectF); | 131 | painter->drawImage(viewRectF, img, imgRectF); | ||
132 | } | 132 | } | ||
133 | 133 | | |||
134 | void RedEyeReductionTool::mousePressEvent(QGraphicsSceneMouseEvent* event) | 134 | void RedEyeReductionTool::mousePressEvent(QGraphicsSceneMouseEvent* event) | ||
135 | { | 135 | { | ||
136 | event->accept(); | 136 | if (event->buttons() != Qt::LeftButton | ||
137 | if (event->buttons() != Qt::LeftButton) { | 137 | || event->modifiers() & Qt::ControlModifier) { | ||
138 | event->ignore(); | ||||
138 | return; | 139 | return; | ||
139 | } | 140 | } | ||
141 | event->accept(); | ||||
140 | if (d->mStatus == NotSet) { | 142 | if (d->mStatus == NotSet) { | ||
141 | d->mToolWidget->diameterSpinBox->setValue(d->mDiameter); | 143 | d->mToolWidget->diameterSpinBox->setValue(d->mDiameter); | ||
142 | d->mToolWidget->showMainPage(); | 144 | d->mToolWidget->showMainPage(); | ||
143 | d->mStatus = Adjusting; | 145 | d->mStatus = Adjusting; | ||
144 | } | 146 | } | ||
145 | d->mCenter = imageView()->mapToImage(event->pos()); | 147 | d->mCenter = imageView()->mapToImage(event->pos()); | ||
146 | imageView()->update(); | 148 | imageView()->update(); | ||
147 | } | 149 | } | ||
▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines |