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: the incorrect coordinate position display #500

Closed
wants to merge 1 commit into from
Closed

fix: the incorrect coordinate position display #500

wants to merge 1 commit into from

Conversation

add-uos
Copy link
Contributor

@add-uos add-uos commented Jul 12, 2024

the incorrect coordinate position display

Log: the incorrect coordinate position display
Bug: https://pms.uniontech.com/bug-view-261623.html

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: add-uos

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

the incorrect coordinate position display

Log: the incorrect coordinate position display
Bug: https://pms.uniontech.com/bug-view-261623.html
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • 在代码中存在重复的计算,例如计算intersectRect_1intersectRect_2的逻辑在处理两种情况时非常相似,可以考虑重构以减少重复。
  • 变量命名可以更加清晰,例如area_1area_2可以改为intersectionArea_1intersectionArea_2,以更好地表达其含义。
  • 在处理is_inScreen1is_inScreen2时,逻辑可能不够清晰,建议添加注释或重构以提高可读性。
  • if (area_1 > area_2)if (area_1 == 0 && area_2 != 0)这两个条件判断中,逻辑似乎重复,可能存在逻辑错误。
  • if (intersectRect_1.y() + intersectRect_1.height() == tmp_screenInfo.at(0).y + tmp_screenInfo.at(0).height || intersectRect_1.y() + intersectRect_1.height() + m_toolBar->height() >= tmp_screenInfo.at(0).y + tmp_screenInfo.at(0).height)这个判断中,intersectRect_1.y() + intersectRect_1.height()可能会超过tmp_screenInfo.at(0).y + tmp_screenInfo.at(0).height,建议添加边界检查。
  • if (intersectRect_2.y() + intersectRect_2.height() == tmp_screenInfo.at(1).y + tmp_screenInfo.at(1).height || intersectRect_2.y() + intersectRect_2.height() + m_toolBar->height() >= tmp_screenInfo.at(1).y + tmp_screenInfo.at(1).height)这个判断中,与上述判断类似,建议添加边界检查。

是否建议立即修改:

@add-uos add-uos closed this Jul 12, 2024
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.

2 participants