Opened 21 years ago

Closed 21 years ago

Last modified 15 years ago

#913 closed defect (fixed)

Attempt to navigate to deleted TOC entry crashes

Reported by: mbrennan@… Owned by: levon
Priority: high Milestone: 1.3.1
Component: dialogs Version: 1.3.0
Severity: critical Keywords: crash patch VERIFIED
Cc: lasgouttes@…

Description

If an item from the TOC is then deleted from the main document, clicking on that
item's name, which still exists in the TOC window causes LyX to crash and die.
If the item existed, the cursor should jump to that item.

For example:
In a new document, Insert->TOC, then create two sections, one called 'Intro' and
the second 'Method'. Then View->TOC. Now go to document and delete the entire
Method line and move cursor to Intro line. Clicking on Method in the TOC window
causes entire program to die.

Perhaps a call to update the TOC window before trying to place the cursor in the
main document? If item no longer exists in main document, than cursor should
not move.

Attachments (1)

toc.diff (4.6 KB ) - added by levon 21 years ago.
patch

Download all attachments as: .zip

Change History (9)

comment:1 by levon, 21 years ago

Cc: lasgouttes@… added
Keywords: crash added
Milestone: 1.3.1
Severity: normalcritical
Summary: Deleted TOC entry causes crashAttempt to navigate to deleted TOC entry crashes
Version: 1.2.31.3.0

Wow, yes. I thought we stored only a paragraph ID ?

Clearly not. Angus, I don't even see a good reason to store
the Paragraph *. Looking into it ...

comment:2 by levon, 21 years ago

Keywords: patch added

by levon, 21 years ago

Attachment: toc.diff added

patch

comment:3 by levon, 21 years ago

Owner: changed from leeming to levon

Well, it works for me fine, anyway.

Of course, auto-update would be nice, but we've had
that discussion too many times :)

comment:4 by lasgouttes, 21 years ago

It looks reasonable. Commit it to main trunk, and if nothing bad
happens, It'll go to 1.3.1 too.

comment:5 by levon, 21 years ago

Keywords: fixedintrunk added
Status: newassigned

comment:6 by levon, 21 years ago

Resolution: fixed
Status: assignedclosed

applied

comment:7 by levon, 21 years ago

Keywords: VERIFIED added

comment:8 by ps@…, 15 years ago

Keywords: fixedintrunk removed
Note: See TracTickets for help on using tickets.