Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Joao Oliveira
Okular
Commits
f84c2566
Commit
f84c2566
authored
Dec 26, 2007
by
Pino Toscano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't activate the TOC when it has no items
svn path=/trunk/KDE/kdegraphics/okular/; revision=753072
parent
b92fce00
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
1 deletion
+8
-1
ui/toc.cpp
ui/toc.cpp
+1
-1
ui/tocmodel.cpp
ui/tocmodel.cpp
+5
-0
ui/tocmodel.h
ui/tocmodel.h
+2
-0
No files found.
ui/toc.cpp
View file @
f84c2566
...
...
@@ -79,7 +79,7 @@ void TOC::notifySetup( const QVector< Okular::Page * > & /*pages*/, int setupFla
// else populate the listview and enable the tab
m_model
->
fill
(
syn
);
emit
hasTOC
(
true
);
emit
hasTOC
(
!
m_model
->
isEmpty
()
);
}
void
TOC
::
notifyViewportChanged
(
bool
/*smoothMove*/
)
...
...
ui/tocmodel.cpp
View file @
f84c2566
...
...
@@ -313,6 +313,11 @@ void TOCModel::setCurrentViewport( const Okular::DocumentViewport &viewport )
}
}
bool
TOCModel
::
isEmpty
()
const
{
return
d
->
root
->
children
.
isEmpty
();
}
QString
TOCModel
::
externalFileNameForIndex
(
const
QModelIndex
&
index
)
const
{
if
(
!
index
.
isValid
()
)
...
...
ui/tocmodel.h
View file @
f84c2566
...
...
@@ -41,6 +41,8 @@ class TOCModel : public QAbstractItemModel
void
clear
();
void
setCurrentViewport
(
const
Okular
::
DocumentViewport
&
viewport
);
bool
isEmpty
()
const
;
QString
externalFileNameForIndex
(
const
QModelIndex
&
index
)
const
;
Okular
::
DocumentViewport
viewportForIndex
(
const
QModelIndex
&
index
)
const
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment