GUI: more fixes to drag to move
This commit is contained in:
parent
35bc757adf
commit
d66ff353ba
|
@ -100,8 +100,16 @@ void FurnaceGUI::updateSelection(int xCoarse, int xFine, int y, bool fullRow) {
|
||||||
dragDestinationX=dragSourceX-dragStart.xCoarse;
|
dragDestinationX=dragSourceX-dragStart.xCoarse;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dragEnd.xCoarse+(dragDestinationX-dragSourceX)>lastChannel) {
|
if (dragEnd.xCoarse+(dragDestinationX-dragSourceX)>=lastChannel) {
|
||||||
|
dragDestinationX=lastChannel-(dragEnd.xCoarse-dragSourceX)-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dragStart.y+(dragDestinationY-dragSourceY)<0) {
|
||||||
|
dragDestinationY=dragSourceY-dragStart.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dragEnd.y+(dragDestinationY-dragSourceY)>=e->curSubSong->patLen) {
|
||||||
|
dragDestinationY=e->curSubSong->patLen-(dragEnd.y-dragSourceY)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
selStart.xCoarse=dragStart.xCoarse+(dragDestinationX-dragSourceX);
|
selStart.xCoarse=dragStart.xCoarse+(dragDestinationX-dragSourceX);
|
||||||
|
|
Loading…
Reference in a new issue