Summary: | unable to click bottom right corner | ||
---|---|---|---|
Product: | [Applications] knavalbattle | Reporter: | Graf Zahl <graf.zahl> |
Component: | general | Assignee: | Nikolas Zimmermann <wildfox> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | maksim |
Priority: | NOR | ||
Version: | 1.0 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Graf Zahl
2001-11-24 19:47:21 UTC
I have a similar problem with the KBattleship included in Debian/KDE 3.1 (packaged by kde.org) on both x86 and PowerPC. Sometimes clicks aren't acknowledged (ie, no shot is made). As far as I can tell, battleship always works properly if the pointer stays within the grid as you move it to its destination (ie the place where you shoot). If the pointer moves from outside the grid and directly onto the destination, then it might not work. The cell in the lower-right corner is the most onerous. Subject: kdegames/kbattleship/kbattleship CVS commit by orlovich: Fix nonsense field geometry calculations that worked by a miracle and caused the end of the last row and column to be excluded from event handling (#35319) CCMAIL:35319-done@bugs.kde.org M +2 -2 kbattlefield.cpp 1.52 --- kdegames/kbattleship/kbattleship/kbattlefield.cpp #1.51:1.52 @@ -227,9 +227,9 @@ int KBattleField::rectX() QRect KBattleField::ownRect() { - return QRect(ownXPosition(), ownYPosition(), ownXPosition() + ((m_ownfieldx - 1) * gridSize()), ownYPosition() + ((m_ownfieldy - 1) * gridSize())); + return QRect(ownXPosition(), ownYPosition(), m_ownfieldx * gridSize(), m_ownfieldy * gridSize()); } QRect KBattleField::enemyRect() { - return QRect(enemyXPosition(), enemyYPosition(), rectX() + ((m_enemyfieldx - 1) * gridSize()), enemyYPosition() + ((m_enemyfieldy - 1) * gridSize())); + return QRect(enemyXPosition(), enemyYPosition(), m_enemyfieldx * gridSize(), m_enemyfieldy * gridSize()); } |