Normand Briere
2019-05-05 631719825b865aaf9fa1cb124d9fc5bd9dd78bd4
CameraPane.java
....@@ -13519,7 +13519,7 @@
1351913519 public void mousePressed(MouseEvent e)
1352013520 {
1352113521 //System.out.println("mousePressed: " + e);
13522
- clickStart(e.getX(), e.getY(), e.getModifiersEx());
13522
+ clickStart(e.getX(), e.getY(), e.getModifiers(), e.getModifiersEx());
1352313523 }
1352413524
1352513525 static long prevtime = 0;
....@@ -13595,8 +13595,8 @@
1359513595 // mode |= META;
1359613596 //}
1359713597
13598
- SetMouseMode(WHEEL | e.getModifiersEx());
13599
- drag(anchorX, anchorY + e.getUnitsToScroll()*8, 0);
13598
+ SetMouseMode(e.getModifiers(), WHEEL | e.getModifiersEx());
13599
+ drag(anchorX, anchorY + e.getUnitsToScroll()*8, 0, 0);
1360013600 anchorX = ax;
1360113601 anchorY = ay;
1360213602 prevX = px;
....@@ -13656,6 +13656,10 @@
1365613656 // wasliveok = true;
1365713657 // waslive = false;
1365813658
13659
+ // May 2019 Forget it:
13660
+ if (true)
13661
+ return;
13662
+
1365913663 // source == timer
1366013664 if (mouseDown)
1366113665 {
....@@ -13694,7 +13698,7 @@
1369413698
1369513699 javax.swing.Timer timer = new javax.swing.Timer(350, this);
1369613700
13697
- void clickStart(int x, int y, int modifiers)
13701
+ void clickStart(int x, int y, int modifiers, int modifiersex)
1369813702 {
1369913703 if (!wasliveok)
1370013704 return;
....@@ -13711,7 +13715,7 @@
1371113715 // touched = true; // main DL
1371213716 if (isRenderer)
1371313717 {
13714
- SetMouseMode(modifiers);
13718
+ SetMouseMode(modifiers, modifiersex);
1371513719 }
1371613720
1371713721 selectX = anchorX = x;
....@@ -13724,7 +13728,7 @@
1372413728 clicked = true;
1372513729 hold = false;
1372613730
13727
- if (((modifiers & ~1024) & ~0) == 0) // Single or multiple selection
13731
+ if (((modifiersex & ~1024) & ~0) == 0) // Single or multiple selection
1372813732 // june 2013 means CTRL_CLICK: if (((modifiers & ~1024) & ~128) == 0) // Single or multiple selection
1372913733 {
1373013734 // System.out.println("RESTART II " + modifiers);
....@@ -13755,7 +13759,7 @@
1375513759 info.camera = renderCamera;
1375613760 info.x = x;
1375713761 info.y = y;
13758
- info.modifiers = modifiers;
13762
+ info.modifiers = modifiersex;
1375913763 editObj = object.doEditClick(info, 0);
1376013764 if (!editObj)
1376113765 {
....@@ -13784,7 +13788,7 @@
1378413788 clickEnd(e.getX(), e.getY(), e.getModifiersEx());
1378513789 }
1378613790 else
13787
- drag(e.getX(), e.getY(), e.getModifiersEx());
13791
+ drag(e.getX(), e.getY(), e.getModifiers(), e.getModifiersEx());
1378813792
1378913793 //try { Thread.sleep(1); } catch (Exception ex) {}
1379013794 }
....@@ -14021,7 +14025,7 @@
1402114025 {
1402214026 Globals.lighttouched = true;
1402314027 }
14024
- drag(X, (mouseMode != 0) ? Y : anchorY, MODIFIERS);
14028
+ drag(X, (mouseMode != 0) ? Y : anchorY, 0, MODIFIERS);
1402514029 }
1402614030 //else
1402714031 }
....@@ -14121,7 +14125,7 @@
1412114125 int X, Y;
1412214126 boolean SX, SY;
1412314127
14124
- void drag(int x, int y, int modifiers)
14128
+ void drag(int x, int y, int modifiers, int modifiersex)
1412514129 {
1412614130 if (IsFrozen())
1412714131 {
....@@ -14130,17 +14134,17 @@
1413014134
1413114135 drag = true; // NEW
1413214136
14133
- boolean continuous = (modifiers & COMMAND) == COMMAND;
14137
+ boolean continuous = (modifiersex & COMMAND) == COMMAND;
1413414138
1413514139 X = x;
1413614140 Y = y;
1413714141 // floating state for animation
14138
- MODIFIERS = modifiers;
14139
- modifiers &= ~1024;
14142
+ MODIFIERS = modifiersex;
14143
+ modifiersex &= ~1024;
1414014144 if (false) // modifiers != 0)
1414114145 {
1414214146 //new Exception().printStackTrace();
14143
- System.out.println("mouseDragged: " + modifiers);
14147
+ System.out.println("mouseDragged: " + modifiersex);
1414414148 System.out.println("SHIFT = " + SHIFT);
1414514149 System.out.println("CONTROL = " + COMMAND);
1414614150 System.out.println("META = " + META);
....@@ -14160,7 +14164,7 @@
1416014164 info.camera = renderCamera;
1416114165 info.x = x;
1416214166 info.y = y;
14163
- object.editWindow.copy.doEditDrag(info);
14167
+ object.editWindow.copy.doEditDrag(info, (modifiers & MouseEvent.BUTTON3_MASK) != 0);
1416414168 } else
1416514169 {
1416614170 if (x < startX)
....@@ -14359,9 +14363,9 @@
1435914363 boolean control = ((modifiers & CTRL) != 0); // june 2013: for point selection
1436014364 boolean command = ((modifiers & COMMAND) != 0); // june 2013: for multiple selection
1436114365
14362
- if (control || command || IsFrozen())
14366
+// No delay if (control || command || IsFrozen())
1436314367 timeout = true;
14364
- else
14368
+// ?? May 2019 else
1436514369 // timer.setDelay((modifiers & 128) != 0?0:350);
1436614370 mouseDown = false;
1436714371 if (!control && !command) // june 2013
....@@ -14471,7 +14475,7 @@
1447114475 System.out.println("keyReleased: " + e);
1447214476 }
1447314477
14474
- void SetMouseMode(int modifiers)
14478
+ void SetMouseMode(int modifiers, int modifiersex)
1447514479 {
1447614480 //System.out.println("SetMouseMode = " + modifiers);
1447714481 //modifiers &= ~1024;
....@@ -14483,7 +14487,7 @@
1448314487 //if (modifiers == 0) // || (modifiers == (1024 | CONTROL)))
1448414488 // return;
1448514489 //System.out.println("SetMode = " + modifiers);
14486
- if ((modifiers & WHEEL) == WHEEL)
14490
+ if ((modifiersex & WHEEL) == WHEEL)
1448714491 {
1448814492 mouseMode |= ZOOM;
1448914493 }
....@@ -14493,15 +14497,15 @@
1449314497 {
1449414498 mouseMode |= VR; // BACKFORTH;
1449514499 }
14496
- if ((modifiers & CTRLCLICK) == CTRLCLICK)
14500
+ if ((modifiersex & CTRLCLICK) == CTRLCLICK)
1449714501 {
1449814502 mouseMode |= SELECT;
1449914503 }
14500
- if ((modifiers & COMMAND) == COMMAND)
14504
+ if ((modifiersex & COMMAND) == COMMAND)
1450114505 {
1450214506 mouseMode |= SELECT;
1450314507 }
14504
- if ((modifiers & SHIFT) == SHIFT || forcetranslate)
14508
+ if ((modifiersex & SHIFT) == SHIFT || forcetranslate || (modifiers & MouseEvent.BUTTON3_MASK) != 0)
1450514509 {
1450614510 mouseMode &= ~VR;
1450714511 mouseMode |= TRANSLATE;
....@@ -14530,7 +14534,7 @@
1453014534
1453114535 if (isRenderer) //
1453214536 {
14533
- SetMouseMode(modifiers);
14537
+ SetMouseMode(0, modifiers);
1453414538 }
1453514539
1453614540 Globals.theRenderer.keyPressed(key);
....@@ -14990,7 +14994,7 @@
1499014994 //mode = ROTATE;
1499114995 if ((MODIFIERS & COMMAND) == 0) // VR??
1499214996 {
14993
- SetMouseMode(modifiers);
14997
+ SetMouseMode(0, modifiers);
1499414998 }
1499514999 }
1499615000
....@@ -15563,6 +15567,7 @@
1556315567 public boolean mouseDown(Event evt, int x, int y)
1556415568 {
1556515569 System.out.println("mouseDown: " + evt);
15570
+ System.exit(0);
1556615571 /*
1556715572 locked = true;
1556815573 drag = false;
....@@ -15606,7 +15611,7 @@
1560615611 {
1560715612 keyPressed(0, modifiers);
1560815613 }
15609
- clickStart(x, y, modifiers);
15614
+ // clickStart(x, y, modifiers);
1561015615 return true;
1561115616 }
1561215617
....@@ -15724,7 +15729,7 @@
1572415729 {
1572515730 keyReleased(0, 0);
1572615731 }
15727
- drag(x, y, modifiers);
15732
+ drag(x, y, 0, modifiers);
1572815733 return true;
1572915734 }
1573015735