Revert r2272; zoom by area plots reverse x axis if done with Shift key pressed

This commit is contained in:
Stefan Frederik 2022-09-07 09:31:09 +02:00
parent 503f080db1
commit 9efacd8a8b
1 changed files with 6 additions and 1 deletions

View File

@ -343,7 +343,12 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int
/* parameters for zoom area by mouse drag */
xx1 = G_X(xctx->mx_double_save);
xx2 = G_X(xctx->mousex_snap);
/* if(xx2 < xx1) { double tmp; tmp = xx1; xx1 = xx2; xx2 = tmp; } */
if(state & ShiftMask) {
if(xx1 < xx2) { double tmp; tmp = xx1; xx1 = xx2; xx2 = tmp; }
} else {
if(xx2 < xx1) { double tmp; tmp = xx1; xx1 = xx2; xx2 = tmp; }
}
if(xx1 == xx2) xx2 += 1e-6;
}