private boolean mDidAddPoint = false;
private boolean mDidDelete = false;
private ControlPoint mCurrentControlPoint = null;
+ private int mCurrentPick = -1;
private ImagePreset mLastPreset = null;
int[] redHistogram = new int[256];
int[] greenHistogram = new int[256];
if (e.getActionMasked() == MotionEvent.ACTION_UP) {
mCurrentControlPoint = null;
+ mCurrentPick = -1;
updateCachedImage();
mDidAddPoint = false;
if (mDidDelete) {
}
Spline spline = getSpline(mCurrentCurveIndex);
- int pick = pickControlPoint(posX, posY);
+ int pick = mCurrentPick;
if (mCurrentControlPoint == null) {
+ pick = pickControlPoint(posX, posY);
if (pick == -1) {
mCurrentControlPoint = new ControlPoint(posX, posY);
pick = spline.addPoint(mCurrentControlPoint);
} else {
mCurrentControlPoint = spline.getPoint(pick);
}
+ mCurrentPick = pick;
}
if (spline.isPointContained(posX, pick)) {