Reintroduce some set_border_width to circumvent some Gtk bugs.
Also fix a bug that let you grab the first and last point of the diagonal curve more easily now, when they are at their left/right extremum.
This commit is contained in:
@@ -756,7 +756,7 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event)
|
||||
|
||||
// Pointer can LEAVE even when dragging the point, so we don't modify the cursor in this case
|
||||
// The cursor will have to LEAVE another time after the drag...
|
||||
if (!buttonPressed)
|
||||
if (!buttonPressed) {
|
||||
if (grab_point == -1) {
|
||||
new_type = CSArrow;
|
||||
lit_point = -1;
|
||||
@@ -764,6 +764,7 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event)
|
||||
setDirty(true);
|
||||
draw (lit_point);
|
||||
}
|
||||
}
|
||||
|
||||
retval = true;
|
||||
break;
|
||||
@@ -786,7 +787,10 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event)
|
||||
int previous_lit_point = lit_point;
|
||||
findClosestPoint();
|
||||
|
||||
if (cursorX < 0 || cursorX > graphW || cursorY < 0 || cursorY > graphH) {
|
||||
{
|
||||
int extendedGraphW = graphW + RADIUS + 1;
|
||||
int extendedGraphH = graphH + RADIUS + 1;
|
||||
if (cursorX < -RADIUS || cursorX > extendedGraphW || cursorY < -RADIUS || cursorY > extendedGraphH) {
|
||||
// the cursor has left the graph area
|
||||
new_type = CSArrow;
|
||||
lit_point = -1;
|
||||
@@ -799,6 +803,7 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event)
|
||||
new_type = CSPlus;
|
||||
lit_point = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (lit_point != previous_lit_point) {
|
||||
setDirty(true);
|
||||
|
Reference in New Issue
Block a user