mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 21:15:11 +00:00
GUI: improve drag-and-drop, part 2 - BROKEN
This commit is contained in:
parent
72465cf09a
commit
311c66ff9f
1 changed files with 7 additions and 6 deletions
|
@ -88,7 +88,7 @@ void FurnaceGUI::updateSelection(int xCoarse, int xFine, int y, bool fullRow) {
|
|||
if (!selecting) return;
|
||||
if (dragging) {
|
||||
dragDestinationX=xCoarse;
|
||||
if (dragStart.xFine>=3) dragDestinationXFine=(xFine|1);
|
||||
if (dragStart.xFine>=3 && dragStart.xCoarse==dragEnd.xCoarse) dragDestinationXFine=(dragSourceXFine&1)?((xFine-1)|1):((xFine+1)&(~1));
|
||||
dragDestinationY=y;
|
||||
cursorDrag.xCoarse=xCoarse;
|
||||
cursorDrag.xFine=xFine;
|
||||
|
@ -107,12 +107,13 @@ void FurnaceGUI::updateSelection(int xCoarse, int xFine, int y, bool fullRow) {
|
|||
dragDestinationX=lastChannel-(dragEnd.xCoarse-dragSourceX)-1;
|
||||
}
|
||||
|
||||
if (dragStart.xFine>=3) {
|
||||
logV("ddd: %d",dragStart.xFine+(dragDestinationXFine-dragSourceXFine));
|
||||
if (dragStart.xFine+(dragDestinationXFine-dragSourceXFine)<3) {
|
||||
dragDestinationXFine=dragStart.xFine+dragSourceXFine-3;
|
||||
if (dragStart.xFine>=3 && dragStart.xCoarse==dragEnd.xCoarse) {
|
||||
if (dragEnd.xFine+(dragDestinationXFine-dragSourceXFine)>(2+e->curPat[dragDestinationX].effectCols*2)) {
|
||||
dragDestinationXFine=(2+e->curPat[dragDestinationX].effectCols*2)-dragEnd.xFine+dragSourceXFine;
|
||||
}
|
||||
logV("ddxf: %d",dragDestinationXFine);
|
||||
if (dragStart.xFine+(dragDestinationXFine-dragSourceXFine)<3) {
|
||||
dragDestinationXFine=3-dragStart.xFine+dragSourceXFine;
|
||||
}
|
||||
}
|
||||
|
||||
if (dragStart.y+(dragDestinationY-dragSourceY)<0) {
|
||||
|
|
Loading…
Reference in a new issue