equal
deleted
inserted
replaced
21 # You should have received a copy of the GNU General Public License |
21 # You should have received a copy of the GNU General Public License |
22 # along with this program; if not, write to the Free Software |
22 # along with this program; if not, write to the Free Software |
23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
24 |
24 |
25 |
25 |
26 from __future__ import absolute_import |
26 |
27 import wx |
27 import wx |
28 import wx.grid |
28 import wx.grid |
29 |
29 |
30 if wx.Platform == '__WXMSW__': |
30 if wx.Platform == '__WXMSW__': |
31 ROW_HEIGHT = 20 |
31 ROW_HEIGHT = 20 |
202 |
202 |
203 def ClearHighlights(self, highlight_type=None): |
203 def ClearHighlights(self, highlight_type=None): |
204 if highlight_type is None: |
204 if highlight_type is None: |
205 self.Highlights = {} |
205 self.Highlights = {} |
206 else: |
206 else: |
207 for _row, row_highlights in self.Highlights.iteritems(): |
207 for _row, row_highlights in self.Highlights.items(): |
208 row_items = row_highlights.items() |
208 row_items = list(row_highlights.items()) |
209 for col, col_highlights in row_items: |
209 for col, col_highlights in row_items: |
210 if highlight_type in col_highlights: |
210 if highlight_type in col_highlights: |
211 col_highlights.remove(highlight_type) |
211 col_highlights.remove(highlight_type) |
212 if len(col_highlights) == 0: |
212 if len(col_highlights) == 0: |
213 row_highlights.pop(col) |
213 row_highlights.pop(col) |