Issue 11138

Title
rendering float problem : TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
Priority
bug
Status
resolved
Superseder
Point of numeric pad throws exception (issue 11354)
Nosy list
ced, reviewbot, roundup-bot, semarie, smn
Assigned to
ced
Keywords
review

Created on 2022-01-14.15:49:07 by semarie, last changed 1 month ago by roundup-bot.

Messages

New changeset 0712649a1b67 by Cédric Krier in branch '6.2':
Do not delete text if there is no end position
https://hg.tryton.org/tryton/rev/0712649a1b67

New changeset e28c9e1739bb by Cédric Krier in branch '6.0':
Do not delete text if there is no end position
https://hg.tryton.org/tryton/rev/e28c9e1739bb
New changeset 7c690f5a3324 by Cédric Krier in branch 'default':
Do not delete text if there is no end position
https://hg.tryton.org/tryton-env/rev/7c690f5a3324
New changeset 0c84c8539ede by Cédric Krier in branch 'default':
Do not delete text if there is no end position
https://hg.tryton.org/tryton/rev/0c84c8539ede
Author: [hidden] (semarie)
Date: 2022-03-21.17:55:03
the proposed diff (patchset 1) works well
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2022-01-14.16:41:02

I guess if end_pos is None, we should not call delete_text.

Author: [hidden] (semarie)
Date: 2022-01-14.15:49:07
When recording a Move, when typing the amount, the following error occurs:

```
  File "/usr/local/tryton-tip/lib/python3.9/site-packages/tryton/common/cellrendererfloat.py", line 41, in key_press_event
    buffer_.delete_text(start_pos, end_pos - start_pos)

TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
```

The error popups when typing the '.' character. For reference, I am using french locale, and use the numpad for decimal.
History
Date User Action Args
2022-04-22 18:58:51roundup-botsetkeyword: - backport
messages: + msg76143
2022-04-16 11:27:49roundup-botsetmessages: + msg75829
2022-04-16 11:27:45roundup-botsetmessages: + msg75828
nosy: + roundup-bot
status: testing -> resolved
2022-04-04 09:01:53smnsetnosy: + smn
2022-03-31 09:13:17pokolisetsuperseder: + Point of numeric pad throws exception
2022-03-31 08:27:48semarielinkissue11354 superseder
2022-03-21 17:55:03semariesetmessages: + msg74653
2022-03-19 01:27:52reviewbotsetmessages: + msg74597
nosy: + reviewbot
2022-03-19 01:15:28cedsetassignedto: ced
keyword: + backport, review
reviews: 371051002
status: chatting -> testing
2022-01-14 16:41:02cedsetmessages: + msg73245
nosy: + ced
status: unread -> chatting

Showing 10 items. Show all history (warning: this could be VERY long)