mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
Fix bug 3023 (Clicking into a math inset resets the position of the TOC dialog):
http://bugzilla.lyx.org/show_bug.cgi?id=3023 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17102 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3279f50916
commit
bf3f30c478
@ -208,6 +208,14 @@ TocIterator const TocBackend::item(
|
|||||||
|
|
||||||
--it;
|
--it;
|
||||||
|
|
||||||
|
ParConstIterator par_it_text = par_it;
|
||||||
|
if (par_it_text.inMathed())
|
||||||
|
// It would be better to do
|
||||||
|
// par_it_text.backwardInset();
|
||||||
|
// but this method does not exist.
|
||||||
|
while (par_it_text.inMathed())
|
||||||
|
par_it_text.backwardPos();
|
||||||
|
|
||||||
for (; it != last; --it) {
|
for (; it != last; --it) {
|
||||||
|
|
||||||
// A good solution for Items inside insets would be to do:
|
// A good solution for Items inside insets would be to do:
|
||||||
@ -218,7 +226,7 @@ TocIterator const TocBackend::item(
|
|||||||
// But for an unknown reason, std::distance(current, it->par_it_) always
|
// But for an unknown reason, std::distance(current, it->par_it_) always
|
||||||
// returns a positive value and std::distance(it->par_it_, current) takes forever...
|
// returns a positive value and std::distance(it->par_it_, current) takes forever...
|
||||||
// So for now, we do:
|
// So for now, we do:
|
||||||
if (it->par_it_.pit() <= par_it.pit())
|
if (it->par_it_.pit() <= par_it_text.pit())
|
||||||
return it;
|
return it;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user