]> git.lyx.org Git - features.git/commit
Partial cleanup of the row selection code
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 15 Jan 2018 15:14:21 +0000 (16:14 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 15 Jan 2018 16:20:34 +0000 (17:20 +0100)
commit654cded167a3d5ce3ee8ec171a698268ef2d589f
tree444426ba47150b441bc38ec2eaadf7fbed887af4
parent0bc542ab7ecaf1d19feae806cc5d4769328041f0
Partial cleanup of the row selection code

This is preliminary work, this code still feels too complicated for
its own good.

Let Row::isMarginSelected return false when Row::selection() is false
(the other changes are indentation).

This allows to remove the test for selection() in
setSelectionAndMargins, so that begin/end_margin_sel are always set
correctly.

Add clearSelectionAndMargins() instead of calling directly setSelection
(which is now private) with arguments (-1, -1).

Fixes bug #10972.
src/Row.cpp
src/Row.h
src/TextMetrics.cpp