Abdel, I am afraid your patch introduces a couple of problems:

In toc combo number of entries is multiplied when update button is pressed.
(typeCO has entries tables/figure/TOC/tables/figure/TOC/......... depending
on how many times you pressed the button.)

eventually, when older TOC is chosen from this combo, lyx crashes. (see
debug info)

It does not correct the wrong behavior that lot/lof selects always the last
item.

here is he stack trace for the crash

#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb721e770 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb721fef3 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0x0857b5cb in lyx::support::abort () at abort.C:25
#4  0x084e6128 in lyx::frontend::QToc::tocModel (this=0x8b99d30, type=5) at
QToc.C:74
#5  0x084e3d0e in lyx::frontend::TocWidget::setTocModel (this=0x93aba30,
type=5) at TocWidget.C:288
#6  0x084e4c68 in lyx::frontend::TocWidget::qt_metacall (this=0x93aba30,
_c=QMetaObject::InvokeMetaMethod, _id=10, _a=0xbfcb5a1c) at
TocWidget_moc.cpp:91
#7  0xb76ff748 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#8  0xb77000ca in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#9  0xb7c3a6b3 in QComboBox::currentIndexChanged () from
/usr/lib/libQtGui.so.4
#10 0xb7c3e512 in QComboBox::currentText () from /usr/lib/libQtGui.so.4
#11 0xb7c3cf62 in QComboBox::setCurrentIndex () from /usr/lib/libQtGui.so.4
#12 0xb7c3e5fe in QComboBox::currentText () from /usr/lib/libQtGui.so.4
#13 0xb7c446be in QComboBox::qt_metacall () from /usr/lib/libQtGui.so.4
#14 0xb76ff748 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#15 0xb77000ca in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#16 0xb7e04453 in QCheckBox::qt_metacast () from /usr/lib/libQtGui.so.4
#17 0xb7c3be44 in QComboBox::hidePopup () from /usr/lib/libQtGui.so.4
#18 0xb7998541 in QApplicationPrivate::notify_helper () from
/usr/lib/libQtGui.so.4
#19 0xb799aff3 in QApplication::notify () from /usr/lib/libQtGui.so.4
#20 0x084177f0 in lyx::frontend::GuiApplication::notify (this=0x87d5f48,
receiver=0x9435ed8, event=0xbfcb6510) at GuiApplication.C:223
#21 0xb79f399e in QApplication::x11ProcessEvent () from
/usr/lib/libQtGui.so.4
#22 0xb79f2038 in QApplication::x11ProcessEvent () from
/usr/lib/libQtGui.so.4
#23 0xb7a16b84 in QX11Info::copyX11Data () from /usr/lib/libQtGui.so.4
#24 0xb7579802 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#25 0xb757c7df in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#26 0xb757cd45 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#27 0xb77116ae in QEventDispatcherGlib::processEvents () from
/usr/lib/libQtCore.so.4
#28 0xb7a16935 in QX11Info::copyX11Data () from /usr/lib/libQtGui.so.4
#29 0xb76ed2f1 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#30 0xb76ed3fa in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#31 0xb76ef7f8 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#32 0xb7998007 in QApplication::exec () from /usr/lib/libQtGui.so.4
#33 0x0818acf2 in lyx::LyX::exec (this=0xbfcb6c1c, [EMAIL PROTECTED],
argv=0xbfcb6cd4) at lyx_main.C:462
#34 0x08066180 in main (argc=1, argv=Cannot access memory at address 0x551d

Reply via email to