Merge remote-tracking branch 'origin/objectprecedence' into dev
This commit is contained in:
@@ -404,6 +404,26 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y)
|
|||||||
action_y = 0;
|
action_y = 0;
|
||||||
needRedraw = true;
|
needRedraw = true;
|
||||||
}
|
}
|
||||||
|
} else if (iarea->getToolMode () == TMHand
|
||||||
|
&& editSubscriber
|
||||||
|
&& cropgl
|
||||||
|
&& cropgl->inImageArea(iarea->posImage.x, iarea->posImage.y)
|
||||||
|
&& editSubscriber->getEditingType() == ET_OBJECTS
|
||||||
|
&& iarea->getObject() >= 0
|
||||||
|
)
|
||||||
|
{
|
||||||
|
needRedraw = editSubscriber->button1Pressed(bstate);
|
||||||
|
if (editSubscriber->isDragging()) {
|
||||||
|
state = SEditDrag1;
|
||||||
|
} else if (editSubscriber->isPicking()) {
|
||||||
|
state = SEditPick1;
|
||||||
|
pickedObject = iarea->getObject();
|
||||||
|
pickModifierKey = bstate;
|
||||||
|
}
|
||||||
|
press_x = x;
|
||||||
|
press_y = y;
|
||||||
|
action_x = 0;
|
||||||
|
action_y = 0;
|
||||||
} else if (onArea (CropTopLeft, x, y)) {
|
} else if (onArea (CropTopLeft, x, y)) {
|
||||||
state = SResizeTL;
|
state = SResizeTL;
|
||||||
press_x = x;
|
press_x = x;
|
||||||
@@ -477,7 +497,7 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y)
|
|||||||
cropgl->cropInit (cropHandler.cropParams->x, cropHandler.cropParams->y, cropHandler.cropParams->w, cropHandler.cropParams->h);
|
cropgl->cropInit (cropHandler.cropParams->x, cropHandler.cropParams->y, cropHandler.cropParams->w, cropHandler.cropParams->h);
|
||||||
} else if (iarea->getToolMode () == TMHand) {
|
} else if (iarea->getToolMode () == TMHand) {
|
||||||
if (editSubscriber) {
|
if (editSubscriber) {
|
||||||
if ((cropgl && cropgl->inImageArea(iarea->posImage.x, iarea->posImage.y) && (editSubscriber->getEditingType() == ET_PIPETTE && (bstate & GDK_CONTROL_MASK))) || editSubscriber->getEditingType() == ET_OBJECTS) {
|
if ((cropgl && cropgl->inImageArea(iarea->posImage.x, iarea->posImage.y) && editSubscriber->getEditingType() == ET_PIPETTE && (bstate & GDK_CONTROL_MASK))) {
|
||||||
needRedraw = editSubscriber->button1Pressed(bstate);
|
needRedraw = editSubscriber->button1Pressed(bstate);
|
||||||
if (editSubscriber->isDragging()) {
|
if (editSubscriber->isDragging()) {
|
||||||
state = SEditDrag1;
|
state = SEditDrag1;
|
||||||
@@ -492,7 +512,7 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y)
|
|||||||
action_y = 0;
|
action_y = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (state != SEditDrag1) {
|
if (state != SEditDrag1 && state != SEditPick1) {
|
||||||
state = SCropImgMove;
|
state = SCropImgMove;
|
||||||
press_x = x;
|
press_x = x;
|
||||||
press_y = y;
|
press_y = y;
|
||||||
@@ -1256,6 +1276,8 @@ void CropWindow::updateCursor (int x, int y)
|
|||||||
newType = CSArrow;
|
newType = CSArrow;
|
||||||
} else if (onArea (CropToolBar, x, y)) {
|
} else if (onArea (CropToolBar, x, y)) {
|
||||||
newType = CSMove;
|
newType = CSMove;
|
||||||
|
} else if (iarea->getObject() > -1 && editSubscriber && editSubscriber->getEditingType() == ET_OBJECTS) {
|
||||||
|
newType = editSubscriber->getCursor(iarea->getObject());
|
||||||
} else if (onArea (CropResize, x, y)) {
|
} else if (onArea (CropResize, x, y)) {
|
||||||
newType = CSResizeDiagonal;
|
newType = CSResizeDiagonal;
|
||||||
} else if (tm == TMColorPicker && hoveredPicker) {
|
} else if (tm == TMColorPicker && hoveredPicker) {
|
||||||
|
@@ -93,7 +93,7 @@ Gradient::Gradient () : FoldableToolPanel(this, "gradient", M("TP_GRADIENT_LABEL
|
|||||||
centerCircle = new Circle();
|
centerCircle = new Circle();
|
||||||
centerCircle->datum = Geometry::IMAGE;
|
centerCircle->datum = Geometry::IMAGE;
|
||||||
centerCircle->radiusInImageSpace = false;
|
centerCircle->radiusInImageSpace = false;
|
||||||
centerCircle->radius = 30;
|
centerCircle->radius = 12;
|
||||||
centerCircle->filled = true;
|
centerCircle->filled = true;
|
||||||
|
|
||||||
EditSubscriber::mouseOverGeometry.push_back( hLine );
|
EditSubscriber::mouseOverGeometry.push_back( hLine );
|
||||||
|
Reference in New Issue
Block a user