mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 06:53:01 +00:00
GUI: more fixes to drag to move
This commit is contained in:
parent
35bc757adf
commit
d66ff353ba
1 changed files with 10 additions and 2 deletions
|
@ -100,8 +100,16 @@ void FurnaceGUI::updateSelection(int xCoarse, int xFine, int y, bool fullRow) {
|
|||
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);
|
||||
|
|
Loading…
Reference in a new issue