fix opening the browser in an empty collection case
_onRowChanged() no longer exists, and super-frustratingly mypy doesn't seem to notice references to missing properties on mw or mw.browser
This commit is contained in:
parent
f71446ddf5
commit
75a0f165c6
@ -735,7 +735,7 @@ class Browser(QMainWindow):
|
|||||||
show_invalid_search_error(err)
|
show_invalid_search_error(err)
|
||||||
if not self.model.cards:
|
if not self.model.cards:
|
||||||
# no row change will fire
|
# no row change will fire
|
||||||
self._onRowChanged(None, None)
|
self.onRowChanged(None, None)
|
||||||
|
|
||||||
def update_history(self) -> None:
|
def update_history(self) -> None:
|
||||||
sh = self.mw.pm.profile["searchHistory"]
|
sh = self.mw.pm.profile["searchHistory"]
|
||||||
@ -832,7 +832,7 @@ QTableView {{ gridline-color: {grid} }}
|
|||||||
gui_hooks.editor_did_init_left_buttons.remove(add_preview_button)
|
gui_hooks.editor_did_init_left_buttons.remove(add_preview_button)
|
||||||
|
|
||||||
@ensure_editor_saved
|
@ensure_editor_saved
|
||||||
def onRowChanged(self, current: QItemSelection, previous: QItemSelection) -> None:
|
def onRowChanged(self, current: Optional[QItemSelection], previous: Optional[QItemSelection]) -> None:
|
||||||
"""Update current note and hide/show editor."""
|
"""Update current note and hide/show editor."""
|
||||||
if self._closeEventHasCleanedUp:
|
if self._closeEventHasCleanedUp:
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user