| 1486 | } |
| 1487 | |
| 1488 | void ToolManager::DoneDragging() |
| 1489 | { |
| 1490 | // Done dragging - ensure grabber button isn't pushed |
| 1491 | if( mDragBar ) |
| 1492 | { |
| 1493 | mDragBar->SetDocked( mDragBar->GetDock(), false ); |
| 1494 | } |
| 1495 | |
| 1496 | // Release capture |
| 1497 | auto &window = GetProjectFrame( *mParent ); |
| 1498 | if( window.HasCapture() ) |
| 1499 | { |
| 1500 | window.ReleaseMouse(); |
| 1501 | } |
| 1502 | |
| 1503 | // Hide the indicator |
| 1504 | mIndicator->Hide(); |
| 1505 | |
| 1506 | mDragWindow = NULL; |
| 1507 | mDragDock = NULL; |
| 1508 | mDragBar = NULL; |
| 1509 | mPrevDock = NULL; |
| 1510 | mPrevSlot = { ToolBarConfiguration::UnspecifiedPosition }; |
| 1511 | mPrevConfiguration.Clear(); |
| 1512 | mLastPos.x = mBarPos.x = -1; |
| 1513 | mLastPos.y = mBarPos.y = -1; |
| 1514 | mTimer.Stop(); |
| 1515 | mDidDrag = false; |
| 1516 | mClicked = false; |
| 1517 | |
| 1518 | RestoreFocus(); |
| 1519 | } |
| 1520 | |
| 1521 | bool ToolManager::RestoreFocus() |
| 1522 | { |