MCPcopy Create free account
hub / github.com/Meridian59/Meridian59 / EvLButtonUp

Method EvLButtonUp

roomedit/source/editcli.cpp:1449–1578  ·  view source on GitHub ↗

//////////////////////////////////////////////////////////////// TEditorClient ------------- Left mouse button UP: - Stop Drag mode or Stretch selection box mode.

Source from the content-addressed store, hash-verified

1447// - Stop Drag mode or Stretch selection box mode.
1448//
1449void TEditorClient::EvLButtonUp (UINT modKeys, const TPoint& point)
1450{
1451 PointerX = point.x;
1452 PointerY = point.y;
1453
1454 // Stop space+drag panning
1455 if (SpaceDragging)
1456 {
1457 SpacePanning = FALSE;
1458 SpaceDragging = FALSE;
1459 ReleaseCapture();
1460 return;
1461 }
1462
1463 // Ignore if "insert object" mode
1464 if ( InsertingObject )
1465 return;
1466
1467 // Default function member
1468 TLayoutWindow::EvLButtonUp(modKeys, point);
1469
1470 // Stop stretching selection box
1471 if ( StretchSelBox )
1472 {
1473 if ( StretchMoved )
1474 {
1475 SelPtr oldsel;
1476 TMapDC dc (this);
1477
1478 // Delete selection box
1479 DrawStretchSelBox(dc);
1480
1481 // Delete old selection
1482 if ( CurObject >= 0 )
1483 HighlightObject (dc, EditMode, CurObject, HL_COLOR);
1484 HighlightSelection (dc, EditMode, Selected);
1485
1486 // Additive selection box or not? */
1487 if (AdditiveSelBox == FALSE)
1488 ForgetSelection (&Selected);
1489 else
1490 oldsel = Selected;
1491
1492 //
1493 // select all objects in the selection box
1494 //
1495 Selected = SelectObjectsInBox (EditMode, SelBoxX, SelBoxY,
1496 OldSelBoxX, OldSelBoxY);
1497 // Transfer old selection to new selection
1498 if (AdditiveSelBox)
1499 {
1500 while (oldsel != NULL)
1501 {
1502 if ( !IsSelected (Selected, oldsel->objnum) )
1503 SelectObject (&Selected, oldsel->objnum);
1504 UnSelectObject (&oldsel, oldsel->objnum);
1505 }
1506 }

Callers

nothing calls this directly

Calls 10

HighlightObjectFunction · 0.85
HighlightSelectionFunction · 0.85
ForgetSelectionFunction · 0.85
SelectObjectsInBoxFunction · 0.85
SelectObjectFunction · 0.85
UnSelectObjectFunction · 0.85
PlaySoundFunction · 0.85
AutoMergeVerticesFunction · 0.85
StopUndoRecordingFunction · 0.85
IsSelectedFunction · 0.70

Tested by

no test coverage detected