|
15 | 15 |
|
16 | 16 | import builtins |
17 | 17 | import json |
| 18 | +from typing import Iterable |
18 | 19 | from json.decoder import JSONDecodeError |
19 | 20 | from multiprocessing import shared_memory |
20 | 21 |
|
@@ -91,7 +92,8 @@ def __init__(self, parent, controller, tree): |
91 | 92 | self.color_background_help = self.general_settings['background help'] |
92 | 93 | self.color_foreground_text = self.general_settings['foreground text'] |
93 | 94 | GridEditor.__init__(self, parent, len(controller.steps) + 5, max((controller.max_columns + 1), 5), |
94 | | - parent.plugin.grid_popup_creator) |
| 95 | + parent.plugin.grid_popup_creator) |
| 96 | + self._grid = self.GetGridWindow() |
95 | 97 | self._popup_items = ([ |
96 | 98 | _('Insert Cells\tCtrl-Shift-I'), _('Delete Cells\tCtrl-Shift-D'), |
97 | 99 | _(INS_ROWS), _(DEL_ROWS), '---', |
@@ -192,10 +194,10 @@ def __init__(self, parent, controller, tree): |
192 | 194 | self._namespace_updated = None |
193 | 195 | self.InheritAttributes() |
194 | 196 | self.col_label_element = None |
195 | | - if hasattr(self, 'SetupScrolling'): |
196 | | - self.SetupScrolling(scrollToTop=True, scrollIntoView=True) |
197 | | - self.ShowScrollbars(wx.SHOW_SB_ALWAYS, wx.SHOW_SB_ALWAYS) |
198 | | - print("DEBUG: GridBase init at SELF SetupScrolling\n") |
| 197 | + # if hasattr(self, 'SetupScrolling'): |
| 198 | + # self.SetupScrolling(scrollToTop=True, scrollIntoView=True) |
| 199 | + # # self.ShowScrollbars(wx.SHOW_SB_ALWAYS, wx.SHOW_SB_ALWAYS) |
| 200 | + # print("DEBUG: KwEditor init at SELF SetupScrolling\n") |
199 | 201 | # self.Refresh() |
200 | 202 | PUBLISHER.subscribe(self._before_saving, RideBeforeSaving) |
201 | 203 | PUBLISHER.subscribe(self._data_changed, RideItemStepsChanged) |
@@ -698,7 +700,7 @@ def _execute_clipboard_command(self, command_class): |
698 | 700 | data = self._get_main_data(data) |
699 | 701 | self._execute(command_class(self.selection.topleft, data)) |
700 | 702 |
|
701 | | - def _get_main_data(self, data: []) -> []: |
| 703 | + def _get_main_data(self, data: Iterable) -> list: |
702 | 704 | main_data = [] |
703 | 705 | for ldata in data: |
704 | 706 | new_data = [] |
|
0 commit comments