Author: mlytwyn
Date: Sun Mar 12 01:19:00 2017
New Revision: 40384

URL: http://svn.gna.org/viewcvs/gnustep?rev=40384&view=rev
Log:
Better fix for bug 12810 - Script/Images name disappearing when clicked on it

Modified:
    libs/gui/branches/gnustep_testplant_branch/Source/NSOutlineView.m

Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSOutlineView.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSOutlineView.m?rev=40384&r1=40383&r2=40384&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSOutlineView.m   
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSOutlineView.m   Sun Mar 
12 01:19:00 2017
@@ -930,8 +930,6 @@
  */
 - (void) drawRow: (NSInteger)rowIndex clipRect: (NSRect)aRect
 {
-  int startingColumn;
-  int endingColumn;
   NSRect drawingRect;
   NSCell *imageCell = nil;
   NSRect imageRect;
@@ -943,9 +941,6 @@
       return;
     }
 
-  /* Using columnAtPoint: here would make it called twice per row per drawn
-     rect - so we avoid it and do it natively */
-
   if (rowIndex >= _numberOfRows)
     {
       return;
@@ -953,12 +948,15 @@
 
   /* Determine starting column as fast as possible */
   NSArray *columns = [self _visibleColumns];
-  startingColumn = [_tableColumns indexOfObject: [columns firstObject]];
-  endingColumn   = [_tableColumns indexOfObject: [columns lastObject]];
-
+  NSTableColumn *column = nil;
+  NSEnumerator *iter = [columns objectEnumerator];
+  
   /* Draw the row between startingColumn and endingColumn */
-  for (i = startingColumn; i <= endingColumn; i++)
-    {
+  while ((column = [iter nextObject]))
+    {
+      // Drawing visible columns only now based on hidden setting...
+      i = [_tableColumns indexOfObject: column];
+      
       // Testplant-MAL-2015-07-01: Testplant branch code used due to 
NSTableView 
       // for group row processing...which were needed due to Cocoa code flow 
diffs
       // for preparedCell... and data cell generation code


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to