mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Transfered closePB handlling (GUI code) from QToc.C to QTocDialog.C
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13641 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
31d7f2ed30
commit
107356b439
@ -39,9 +39,6 @@ QToc::QToc(Dialog & parent)
|
||||
void QToc::build_dialog()
|
||||
{
|
||||
dialog_.reset(new QTocDialog(this));
|
||||
|
||||
// Manage the cancel/close button
|
||||
bcview().setCancel(dialog_->closePB);
|
||||
}
|
||||
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
#include "QTocDialog.h"
|
||||
#include "QToc.h"
|
||||
#include "Qt2BC.h"
|
||||
#include "qt_helpers.h"
|
||||
#include "controllers/ControlToc.h"
|
||||
|
||||
@ -41,6 +42,9 @@ QTocDialog::QTocDialog(QToc * form)
|
||||
{
|
||||
setupUi(this);
|
||||
|
||||
// Manage the cancel/close button
|
||||
form_->bcview().setCancel(closePB);
|
||||
|
||||
// disable sorting
|
||||
tocTW->setSortingEnabled(false);
|
||||
tocTW->setColumnCount(1);
|
||||
@ -64,8 +68,6 @@ void QTocDialog::on_tocTW_currentItemChanged(QTreeWidgetItem * current,
|
||||
QTreeWidgetItem * previous)
|
||||
{
|
||||
form_->select(fromqstr(current->text(0)));
|
||||
lyxerr[Debug::GUI]
|
||||
<< fromqstr(current->text(0)) << " selected" << endl;
|
||||
}
|
||||
|
||||
void QTocDialog::on_closePB_clicked()
|
||||
@ -227,7 +229,8 @@ void QTocDialog::populateItem(QTreeWidgetItem * parentItem, toc::Toc::const_iter
|
||||
item->setText(0, toqstr(iter->str));
|
||||
|
||||
if (iter->depth < depth_) tocTW->collapseItem(item);
|
||||
// else tocTW->expandItem(item);
|
||||
else tocTW->expandItem(item);
|
||||
|
||||
lyxerr[Debug::GUI]
|
||||
<< "Table of contents: Added item " << iter->str
|
||||
<< " at depth " << iter->depth
|
||||
|
Loading…
Reference in New Issue
Block a user