Author: mlytwyn
Date: Wed Apr 13 01:22:06 2016
New Revision: 39661
URL: http://svn.gna.org/viewcvs/gnustep?rev=39661&view=rev
Log:
Fix search field template menu popup processing
Modified:
libs/gui/branches/gnustep_testplant_branch/Source/NSSearchFieldCell.m
Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSSearchFieldCell.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSSearchFieldCell.m?rev=39661&r1=39660&r2=39661&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSSearchFieldCell.m
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSSearchFieldCell.m
Wed Apr 13 01:22:06 2016
@@ -671,23 +671,12 @@
[[popupmenu itemAtIndex:selectedItemIndex] setState:NSOffState]; // ensure
that state resets fully
[[popupmenu itemAtIndex:selectedItemIndex] setState:NSOnState];
- // Prepare to display the popup
- cvWin = [_control_view window];
- cellFrame = [_control_view frame];
- cellFrame = [[_control_view superview] convertRect:cellFrame toView:nil]; //
convert to window coordinates
- cellFrame.origin = [cvWin convertBaseToScreen:cellFrame.origin]; // convert
to screen coordinates
- mr = [popupmenu menuRepresentation];
-
- // Ask the MenuView to attach the menu to this rect
- [mr setWindowFrameForAttachingToRect: cellFrame
- onScreen: [cvWin screen]
- preferredEdge: NSMinYEdge
- popUpSelectedItem: -1];
-
- // Last, display the window
- [[mr window] orderFrontRegardless];
-
- [mr mouseDown: [NSApp currentEvent]];
+ // TESTPLANT-MAL-04122016: Fix popup menu processing...
+ [pbcell trackMouse: [NSApp currentEvent]
+ inRect: [_control_view bounds]
+ ofView: _control_view
+ untilMouseUp: YES];
+
newSelectedItemIndex = [pbcell indexOfSelectedItem];
if (newSelectedItemIndex != selectedItemIndex && newSelectedItemIndex != -1
&& newSelectedItemIndex < [template numberOfItems])
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs