Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: double click edit incorrect format #543

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

kegechen
Copy link
Contributor

@kegechen kegechen commented Jan 9, 2024

deepin-ci-robot added a commit to linuxdeepin/dtk6widget that referenced this pull request Jan 9, 2024
Synchronize source files from linuxdeepin/dtkwidget.

Source-pull-request: linuxdeepin/dtkwidget#543
@@ -379,7 +377,9 @@ class DCrumbEditPrivate : public DCORE_NAMESPACE::DObjectPrivate
if (cursor.charFormat().objectType() != objectType)
return false;

DCrumbTextFormat format(cursor.charFormat());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

从 cursor 获取 charformat 不准,还是从layout中获取准确一些

@@ -391,7 +391,8 @@ class DCrumbEditPrivate : public DCORE_NAMESPACE::DObjectPrivate

makeCrumb();

if (mousePos.x() < q->cursorRect().left())
if (mousePos.x() < q->cursorRect().left() ||
mousePos.y() < q->cursorRect().top())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

换行时会有计算错误,所以要考虑 y

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Jan 9, 2024

Doc Check bot
🟢 Document Coverage Check Passed!

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Jan 9, 2024

TAG Bot

New tag: 5.6.21
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #542

@deepin-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, kegechen

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

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

deepin-ci-robot added a commit to linuxdeepin/dtk6widget that referenced this pull request Jan 9, 2024
Synchronize source files from linuxdeepin/dtkwidget.

Source-pull-request: linuxdeepin/dtkwidget#543
@kegechen kegechen merged commit 866198e into linuxdeepin:master Jan 9, 2024
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants