Skip to content

fix(viewer): enable navigation in the image information dialog - #181

Merged
deepin-bot[bot] merged 2 commits into
linuxdeepin:develop/eaglefrom
Resurgamz:feature/fix-BUG375299
Sep 9, 2026
Merged

fix(viewer): enable navigation in the image information dialog#181
deepin-bot[bot] merged 2 commits into
linuxdeepin:develop/eaglefrom
Resurgamz:feature/fix-BUG375299

Conversation

@Resurgamz

@Resurgamz Resurgamz commented Sep 8, 2026

Copy link
Copy Markdown

Summary

Opening the image information dialog moves the active shortcut context away
from the viewer window, preventing the existing Left and Right window
shortcuts from switching images.

Add Left and Right shortcuts to the information dialog and forward them to
the existing image navigation handlers. Remove the incorrect
setFocus(Qt::NoFocusReason) call, which sets focus instead of clearing it.

打开图片信息窗口后,主看图窗口的左右方向键快捷键失去活动窗口上下文,
导致无法切换图片。本修改在图片信息窗口中增加左右方向键处理,并将请求
转发至现有切图逻辑,同时移除错误的焦点设置。

Log: 修复打开图片信息后无法使用左右方向键切换图片的问题
Bug: https://pms.uniontech.com/bug-view-375299.html
Influence: 图片信息窗口打开时可使用左右方向键切图并同步刷新图片信息。

Verification

  • libimageviewer builds successfully.
  • git diff --check passes.
  • The full test target is blocked by the existing unrelated
    OnFinishPinchAnimal compilation error in
    tests/test_LibImageGraphicsView.cpp.

Summary by Sourcery

Enable image navigation from the information dialog by forwarding its arrow-key actions to the viewer’s existing previous and next image handlers.

New Features:

  • Enable Left and Right arrow-key navigation while the image information dialog is open.

Bug Fixes:

  • Restore image switching from the information dialog and keep its displayed metadata synchronized with the selected image.

Enhancements:

  • Remove the incorrect focus-setting call when opening the information dialog.

Forward Left and Right shortcuts from the image information dialog to the
existing image navigation handlers and remove the incorrect focus call.

将图片信息窗口的左右方向键转发至现有图片切换处理,并移除错误的
焦点设置。

Log: 修复打开图片信息后无法使用左右方向键切换图片的问题
PMS: BUG-375299
Influence: 图片信息窗口打开时可使用左右方向键切图并同步刷新图片信息。
@sourcery-ai

sourcery-ai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The information dialog now owns window-scoped Left and Right shortcuts, forwards their signals to the existing image navigation handlers, and removes the incorrect focus call used during dialog display. Review the shortcut context, signal wiring, and behavior when navigation refreshes the displayed image information.

Sequence diagram for image navigation from the information dialog

sequenceDiagram
    participant User
    participant ExtensionPanel
    participant LibViewPanel
    participant ImageViewer
    participant LibImageInfoWidget

    User->>ExtensionPanel: Left or Right key
    ExtensionPanel->>ExtensionPanel: previousRequested or nextRequested
    ExtensionPanel->>LibViewPanel: showPrevious or showNext
    LibViewPanel->>ImageViewer: navigate to adjacent image
    LibViewPanel->>LibImageInfoWidget: setImagePath
    LibImageInfoWidget-->>User: Refresh image information
Loading

File-Level Changes

Change Details Files
Add dialog-local left/right navigation and route it through the existing viewer navigation flow.
  • Create window-scoped shortcuts for Left and Right in the information dialog.
  • Emit navigation request signals and connect them to the panel’s existing previous/next image handlers.
  • Allow the viewer’s image and information dialog state to refresh through the established navigation logic.
libimageviewer/widgets/extensionpanel.cpp
libimageviewer/widgets/extensionpanel.h
libimageviewer/viewpanel/viewpanel.cpp
Remove the incorrect focus API call when opening the information dialog.
  • Delete the setFocus(Qt::NoFocusReason) invocation so opening the dialog no longer applies an invalid focus-setting operation.
libimageviewer/viewpanel/viewpanel.cpp

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Update the copyright year range in files modified for BUG-375299.

更新 BUG-375299 修改文件的版权年份范围。

Log: 更新修改文件的 SPDX 版权年份
PMS: BUG-375299
Influence: 仅更新版权声明,不影响运行行为。
@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: max-lvs, Resurgamz

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Resurgamz

Copy link
Copy Markdown
Author

/merge

@deepin-bot
deepin-bot Bot merged commit bce79a2 into linuxdeepin:develop/eagle Sep 9, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants