This commit is contained in:
Ignacio Serantes
2026-04-12 11:56:39 +02:00
parent 1508e629c0
commit 8ade5fde54
6 changed files with 72 additions and 9 deletions

View File

@@ -1013,8 +1013,12 @@ class FaceCanvas(QLabel):
history = history_list \
if self.viewer.main_win else []
setting_key = f"{region_type.lower()}_use_last_name"
suggested = history[0] if history and APP_CONFIG.get(
setting_key, False) else ""
full_tag, updated_history, ok = FaceNameDialog.get_name(
self.viewer, history,
self.viewer, history, current_name=suggested,
main_win=self.viewer.main_win, region_type=region_type)
if ok and full_tag:
@@ -3114,8 +3118,10 @@ class ImageViewer(QWidget):
QApplication.processEvents()
history = self.main_win.face_names_history if self.main_win else []
suggested = history[0] if history and APP_CONFIG.get(
"face_use_last_name", False) else ""
full_tag, updated_history, ok = FaceNameDialog.get_name(
self, history, main_win=self.main_win)
self, history, current_name=suggested, main_win=self.main_win)
if ok and full_tag:
new_face['name'] = full_tag
@@ -3171,8 +3177,10 @@ class ImageViewer(QWidget):
QApplication.processEvents()
history = self.main_win.pet_names_history if self.main_win else []
suggested = history[0] if history and APP_CONFIG.get(
"pet_use_last_name", False) else ""
full_tag, updated_history, ok = FaceNameDialog.get_name(
self, history, main_win=self.main_win, region_type="Pet")
self, history, current_name=suggested, main_win=self.main_win, region_type="Pet")
if ok and full_tag:
new_pet['name'] = full_tag
@@ -3229,8 +3237,10 @@ class ImageViewer(QWidget):
# For bodies, we typically don't ask for a name immediately unless desired
# Or we can treat it like pets/faces and ask. Let's ask.
history = self.main_win.body_names_history if self.main_win else []
suggested = history[0] if history and APP_CONFIG.get(
"body_use_last_name", False) else ""
full_tag, updated_history, ok = FaceNameDialog.get_name(
self, history, main_win=self.main_win, region_type="Body")
self, history, current_name=suggested, main_win=self.main_win, region_type="Body")
if ok and full_tag:
new_body['name'] = full_tag
@@ -3317,7 +3327,7 @@ class ImageViewer(QWidget):
# A standard tick is 120. We define a threshold based on speed.
# Speed 1 (slowest) requires a full 120 delta.
# Speed 10 (fastest) requires 120/10 = 12 delta.
# Still too fast so speed / 2.
# Still too fast so speed / 2.
threshold = 120 / speed / 2
self._wheel_scroll_accumulator += event.angleDelta().y()