Skip to content

Commit

Permalink
Remove some old unused code.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepj committed May 18, 2020
1 parent cf94b42 commit 9ef696b
Showing 1 changed file with 2 additions and 33 deletions.
35 changes: 2 additions & 33 deletions Graph Views/XRGBackgroundView.m
Original file line number Diff line number Diff line change
Expand Up @@ -206,30 +206,7 @@ - (void)mouseDownAction:(NSEvent *)theEvent {
if ([appSettings windowLevel] == kCGDesktopWindowLevel) [NSApp preventWindowOrdering];
NSInteger originalWindowLevel = [parentWindow level];
viewPointClicked = [self convertPoint:[theEvent locationInWindow] fromView:nil];

// Are we supposed to resize a module?
// shouldResizeModule = -1;
// int i;
// for (i = 0; i < [resizeRects count]; i++) {
// NSRect resizeRect = [[resizeRects objectAtIndex:i] rectValue];
// if (NSPointInRect(viewPointClicked, resizeRect)) {
// shouldResizeModule = i;
//
// while ((theEvent = [[self window] nextEventMatchingMask:NSLeftMouseUpMask | NSLeftMouseDraggedMask])) {
// if ([theEvent type] == NSLeftMouseUp) break;
//
// NSPoint currentMousePosition = [self convertPoint:[theEvent locationInWindow] fromView:nil];
//
// float delta = [moduleManager graphOrientationVertical] ? currentMousePosition.y - viewPointClicked.y : currentMousePosition.x - viewPointClicked.x;
// float actualMoveAmount = [moduleManager resizeModuleNumber:shouldResizeModule byDelta:delta];
//
// viewPointClicked = currentMousePosition;
// [[self window] invalidateCursorRectsForView:self];
// }
// return;
// }
// }


// if it's a double click in the title bar, minimize the window
if ([theEvent clickCount] == 2) {
NSRect frame = [self bounds];
Expand Down Expand Up @@ -257,15 +234,7 @@ - (void)mouseDownAction:(NSEvent *)theEvent {
}

- (void)mouseDragged:(NSEvent *)theEvent {
// NSPoint currentMousePosition = [[self window] convertBaseToScreen:[[self window] mouseLocationOutsideOfEventStream]];
// NSLog(@"should resize: %d", shouldResizeModule);
// if (shouldResizeModule != -1) {
// float delta = [moduleManager graphOrientationVertical] ? currentMousePosition.y - viewPointClicked.y : currentMousePosition.x - viewPointClicked.x;
// [moduleManager resizeModuleNumber:shouldResizeModule byDelta:delta];
// }
// else {
[parentWindow mouseDragged:theEvent];
// }
[parentWindow mouseDragged:theEvent];
}

- (void)mouseUp:(NSEvent *)theEvent {
Expand Down

0 comments on commit 9ef696b

Please sign in to comment.