bugGNUstep - Bugs: bug #25709, NSRulerView's delegate method...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #25709: NSRulerView's delegate method rulerView:willAddMarker:atLocation: not called on a click

Submitted by:  Doug Simons <theeggcamefirst>
Submitted on:  Wed 25 Feb 2009 07:52:52 PM UTC  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Gregory John Casamento <gcasa>
Open/Closed: In Test

Fri 10 Apr 2009 03:01:02 AM UTC, comment #2:

Applied this patch. Thank you.

Gregory John Casamento <gcasa>
Project AdministratorIn charge of this item.
Thu 09 Apr 2009 11:04:22 PM UTC, comment #1:

Here's the diff for a fix that works for me to resolve this problem:

root@ubuntu804desktop:/gstep/modules/core/gui/Source# svn diff NSRulerMarker.m
Index: NSRulerMarker.m
===================================================================
--- NSRulerMarker.m (revision 28185)
+++ NSRulerMarker.m (working copy)
@@ -227,7 +227,7 @@
- (BOOL)trackMouse:(NSEvent *)theEvent adding:(BOOL)adding
{
NSView *client = [_rulerView clientView];
- NSEvent *newEvent;
+ NSEvent *newEvent = nil;
int eventMask = NSLeftMouseDraggedMask | NSLeftMouseUpMask;
BOOL isFar = NO;
BOOL askedCanRemove = NO;
@@ -341,12 +341,18 @@
/* loop processing events until mouse up */
while (_isDragging)
{
- newEvent = [NSApp nextEventMatchingMask: eventMask
+ if (newEvent == nil) {
+ newEvent = theEvent;
+ previousMousePositionInWindow = NSMakePoint(0,0);
+ } else {
+ newEvent = [NSApp nextEventMatchingMask: eventMask
untilDate: [NSDate distantFuture]
inMode: NSEventTrackingRunLoopMode
dequeue: YES];
+ }
switch ([newEvent type])
{
+ case NSLeftMouseDown:
case NSLeftMouseDragged:
/* take mouse position from outside of event stream
and ignore event if in same position as previous event,

Doug Simons <theeggcamefirst>
Wed 25 Feb 2009 07:52:52 PM UTC, original submission:

This delegate method is called when the mouse is dragged in the ruler, but not when it is clicked without dragging.

Doug Simons <theeggcamefirst>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by gcasa (Updated the item)
  • -unavailable- added by theeggcamefirst (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 10 Apr 2009 03:01:01 AM UTCgcasaStatusIn Progress=>Fixed
      Open/ClosedOpen=>In Test
    Sun 01 Mar 2009 08:52:49 PM UTCgcasaStatusNone=>In Progress
      Assigned toNone=>gcasa

    Back to the top


    Powered by Savane 3.1-cleanup1