main_window: make S key guard consistent with B/F
S key (toggle save) previously checked _preview._current_post which could be stale after tab switches or right-clicks. Now uses the same guard as B/F: requires posts loaded and a valid grid selection index.
This commit is contained in:
parent
f687141f80
commit
d355f24394
@ -1084,7 +1084,9 @@ class BooruApp(QMainWindow):
|
||||
if 0 <= idx < len(self._posts):
|
||||
self._post_actions.toggle_bookmark(idx)
|
||||
return
|
||||
if key == Qt.Key.Key_S and self._preview._current_post:
|
||||
if key == Qt.Key.Key_S and self._posts:
|
||||
idx = self._grid.selected_index
|
||||
if 0 <= idx < len(self._posts):
|
||||
self._post_actions.toggle_save_from_preview()
|
||||
return
|
||||
elif key == Qt.Key.Key_I:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user