dabo Commit
Revision 7017
Date: 2011-12-09 10:40:13 -0800 (Fri, 09 Dec 2011)
Author: Ed
Trac: http://trac.dabodev.com/changeset/7017
Changed:
U trunk/dabo/ui/uiwx/dGrid.py
Log:
Noticed that the _getSelection() method ignored discontinuous selected cells if
there was also a block of cells selected.
Diff:
Modified: trunk/dabo/ui/uiwx/dGrid.py
===================================================================
--- trunk/dabo/ui/uiwx/dGrid.py 2011-12-09 17:19:01 UTC (rev 7016)
+++ trunk/dabo/ui/uiwx/dGrid.py 2011-12-09 18:40:13 UTC (rev 7017)
@@ -3821,11 +3821,12 @@
if not found:
endPoints.append(pt)
- if rowOrCol.lower()[0] == "r":
+ typ = rowOrCol.lower()[:3]
+ if typ == "row":
cols = self.ColumnCount
rangeStart = [(r, 0) for r in startPoints]
rangeEnd = [(r, cols) for r in endPoints]
- else:
+ elif typ == "col":
rows = self.RowCount
rangeStart = [(0, c) for c in startPoints]
rangeEnd = [(rows, c) for c in endPoints]
@@ -4676,6 +4677,9 @@
# Add any selected columns
if cols:
ret += self._calcRanges(cols, "Cols")
+ # Add any selected cells
+ if cells:
+ ret += [(val, val) for val in cells]
if not ret:
cell = (self.GetGridCursorRow(),
self.GetGridCursorCol())
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]