[Haiku-bugs] [Haiku] #914: Extra characters with replicant + focus change for DeskCalc
Haiku
trac at haiku-os.org
Tue Dec 4 17:02:47 CET 2007
#914: Extra characters with replicant + focus change for DeskCalc
-----------------------------+----------------------------------------------
Reporter: darkwyrm | Owner: stippi
Type: bug | Status: new
Priority: normal | Milestone: R1
Component: - Applications | Version: R1 development
Resolution: | Platform: All
-----------------------------+----------------------------------------------
Changes (by jackburton):
* cc: axeld at pinc-software.de (added)
Comment:
Now, I've done some research on this topic.
Looks like the code in CalcView::MouseDown() is all correct, except it
doesn't work :).
When DeskCalc is a replicant and you click on the textcontrol, the click
is also forwarded to the parent view (and that's ok, nothing wrong with
it), the passed point is also correct. The following calculation, though,
result in something very weird:
in CalcView::MouseDown()
int gridRow = (int)((point.y - sizeDisp) / sizeRow);
point.y - sizeDisp is negative,
sizeRow is positive
gridRow, for some Reason, is 0 (?!?!?), so the next check passes while it
shouldn't
if (gridRow >= 0)... etc.
Has anyone any explanation for this ?
BTW: if I print the result of the calculation as a float, without casting
it to int, it shows the correct negative value.
--
Ticket URL: <http://dev.haiku-os.org/ticket/914#comment:3>
Haiku <http://dev.haiku-os.org>
The Haiku operating system.
More information about the Haiku-bugs
mailing list