GUI: fix drag to move
This commit is contained in:
parent
2313e4fcc3
commit
d47c50edaf
|
@ -91,6 +91,19 @@ void FurnaceGUI::updateSelection(int xCoarse, int xFine, int y, bool fullRow) {
|
||||||
cursorDrag.xFine=xFine;
|
cursorDrag.xFine=xFine;
|
||||||
cursorDrag.y=y;
|
cursorDrag.y=y;
|
||||||
|
|
||||||
|
int len=dragEnd.xCoarse-dragStart.xCoarse+1;
|
||||||
|
if (len<0) len=0;
|
||||||
|
|
||||||
|
DETERMINE_FIRST_LAST;
|
||||||
|
|
||||||
|
if (dragStart.xCoarse+(dragDestinationX-dragSourceX)<firstChannel) {
|
||||||
|
dragDestinationX=dragSourceX-dragStart.xCoarse;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dragEnd.xCoarse+(dragDestinationX-dragSourceX)>lastChannel) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
selStart.xCoarse=dragStart.xCoarse+(dragDestinationX-dragSourceX);
|
selStart.xCoarse=dragStart.xCoarse+(dragDestinationX-dragSourceX);
|
||||||
selStart.xFine=dragStart.xFine;
|
selStart.xFine=dragStart.xFine;
|
||||||
selStart.y=dragStart.y+(dragDestinationY-dragSourceY);
|
selStart.y=dragStart.y+(dragDestinationY-dragSourceY);
|
||||||
|
|
Loading…
Reference in New Issue