mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 09:15:50 +00:00
* TocWidget.cpp: disable sort option for TOC (bug 5983).
* TocModel.cpp: whitespace git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30761 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
975cbd3266
commit
5d2a712467
@ -108,6 +108,7 @@ void TocWidget::on_sortCB_stateChanged(int state)
|
|||||||
updateView();
|
updateView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TocWidget::on_persistentCB_stateChanged(int state)
|
void TocWidget::on_persistentCB_stateChanged(int state)
|
||||||
{
|
{
|
||||||
persistent_ = state == Qt::Checked;
|
persistent_ = state == Qt::Checked;
|
||||||
@ -258,6 +259,13 @@ static bool canNavigate(QString const & type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Test whether sorting is possible
|
||||||
|
static bool isSortable(QString const & type)
|
||||||
|
{
|
||||||
|
return type != "tableofcontents";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void TocWidget::updateView()
|
void TocWidget::updateView()
|
||||||
{
|
{
|
||||||
if (!gui_view_.view()) {
|
if (!gui_view_.view()) {
|
||||||
@ -272,7 +280,7 @@ void TocWidget::updateView()
|
|||||||
depthSL->setEnabled(false);
|
depthSL->setEnabled(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sortCB->setEnabled(true);
|
sortCB->setEnabled(isSortable(current_type_));
|
||||||
depthSL->setEnabled(true);
|
depthSL->setEnabled(true);
|
||||||
typeCO->setEnabled(true);
|
typeCO->setEnabled(true);
|
||||||
tocTV->setEnabled(false);
|
tocTV->setEnabled(false);
|
||||||
@ -288,7 +296,8 @@ void TocWidget::updateView()
|
|||||||
}
|
}
|
||||||
|
|
||||||
sortCB->blockSignals(true);
|
sortCB->blockSignals(true);
|
||||||
sortCB->setChecked(gui_view_.tocModels().isSorted(current_type_));
|
sortCB->setChecked(isSortable(current_type_)
|
||||||
|
&& gui_view_.tocModels().isSorted(current_type_));
|
||||||
sortCB->blockSignals(false);
|
sortCB->blockSignals(false);
|
||||||
|
|
||||||
bool const can_navigate_ = canNavigate(current_type_);
|
bool const can_navigate_ = canNavigate(current_type_);
|
||||||
|
@ -157,6 +157,9 @@ What's new
|
|||||||
- Fix bookmark navigation crash when multiple windows are used
|
- Fix bookmark navigation crash when multiple windows are used
|
||||||
(bug 6000).
|
(bug 6000).
|
||||||
|
|
||||||
|
- Disable the "sort" option in the outliner for the Table of Contents
|
||||||
|
which triggered a crash (bug 5983). Sorting the TOC didn't work anyway.
|
||||||
|
|
||||||
- Fall back to default UI file if the specified one cannot be found
|
- Fall back to default UI file if the specified one cannot be found
|
||||||
(bug 6076).
|
(bug 6076).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user