Text selection does not work as expected
Yu Jin
yu_jin at lyx.org
Sat Jul 4 10:27:04 UTC 2020
Am Fr., 3. Juli 2020 um 17:09 Uhr schrieb Yu Jin <yu_jin at lyx.org>:
> Am Fr., 3. Juli 2020 um 11:12 Uhr schrieb Daniel <xracoonx at gmx.de>:
>
>> On 2/7/20 16:27, Jean-Marc Lasgouttes wrote:
>> > Le 02/07/2020 à 15:43, Daniel a écrit :
>> >> When I double (triple) click on text, instead of the word (line), only
>> >> the word (line) left to the cursor is selected. I don't remember
>> >> seeing this before. Can someone reproduce?
>> >
>> > I cannot reproduce. Master or 2.3?
>> >
>> > JMarc
>>
>> I see. So, here is some more info and testing:
>>
>> LyX Version 2.3.5.2
>> (25 June 2020)
>> Qt Version (run-time): 5.12.5
>> Qt Version (compile-time): 5.12.5
>>
>> Windows 10 1909.
>>
>> I noticed that the selection works fine when I use an external mouse
>> instead of the intrernal trackpad (Surface Pro). The problem is
>> restricted to LyX's work area. No other program I tested exhibits the
>> problem, including Scribus (Qt 5.9.7).
>>
>> I attached a screen recording just to make sure we talk about the same
>> thing. (Unfortunately, the mouse cursor and clicks are not recorded.)
>>
>
> I can reproduce on my notebook, also with master and Qt 5.15.0. I will
> investigate.
>
Looks like GuiWorkArea::mouseMoveEvent(QMouseEvent*) is called falsely, I
get status messages like these when I do a double tap on the touchpad:
Cursor.cpp (781): Cursor::dispatch: cmd: action: 206 [] arg: '' x: 102 y:
69
insets\InsetText.cpp (293): InsetText::doDispatch(): cmd: action: 206 []
arg: '' x: 102 y: 69
Text3.cpp (631): Text::dispatch: cmd: action: 206 [] arg: '' x: 102 y: 69
Cursor.cpp (781): Cursor::dispatch: cmd: action: 208 [] arg: '' x: 102 y:
69
insets\InsetText.cpp (293): InsetText::doDispatch(): cmd: action: 208 []
arg: '' x: 102 y: 69
Text3.cpp (631): Text::dispatch: cmd: action: 208 [] arg: '' x: 102 y: 69
Cursor.cpp (781): Cursor::dispatch: cmd: action: 209 [] arg: '' x: 102 y:
69
insets\InsetText.cpp (293): InsetText::doDispatch(): cmd: action: 209 []
arg: '' x: 102 y: 69
Text3.cpp (631): Text::dispatch: cmd: action: 209 [] arg: '' x: 102 y: 69
Cursor.cpp (781): Cursor::dispatch: cmd: action: 207 [] arg: '' x: 102 y:
69
insets\InsetText.cpp (293): InsetText::doDispatch(): cmd: action: 207 []
arg: '' x: 102 y: 69
Text3.cpp (631): Text::dispatch: cmd: action: 207 [] arg: '' x: 102 y: 69
Cursor.cpp (781): Cursor::dispatch: cmd: action: 208 [] arg: '' x: 102 y:
69
insets\InsetText.cpp (293): InsetText::doDispatch(): cmd: action: 208 []
arg: '' x: 102 y: 69
Text3.cpp (631): Text::dispatch: cmd: action: 208 [] arg: '' x: 102 y: 69
the position of cursor does not change, but the MouseMoveEvent is called
anyway, which is "action: 207" above. I don't think it's LyX's fault though.
Well there are many possible solutions, I went for the easiest one, patch
attached, is it ok for commit?
> Eugene
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200704/2ce20d8b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mouseMoveEvent.diff
Type: application/octet-stream
Size: 886 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200704/2ce20d8b/attachment.obj>
More information about the lyx-devel
mailing list