okular/ui
Ahmad Osama 5e622484c8 Fix problem of saving pdf switches from thumbnail view in sidebar to contents view
Summary:
When save/save as functions are called they internally call the openFile() function, in the open file function the side bar item is set to Table of Contents (ToC) item

```
if ( m_document->metaData( QStringLiteral("OpenTOC") ).toBool() && m_sidebar->isItemEnabled( m_toc ) && !m_sidebar->isCollapsed() && m_sidebar->currentItem() != m_toc )
{
     m_sidebar->setCurrentItem( m_toc, Sidebar::DoNotUncollapseIfCollapsed );
}
```
so I just store the sidebar's item before saving and then set this item back if changed.

BUG: 389668

Reviewers: #okular

Subscribers: aacid, okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D14740
2018-08-13 11:13:00 +02:00
..
data HiDPI Support for Okular 2017-10-14 14:47:20 +02:00
annotationmodel.cpp The work in this branch was sponsored by LiMux 2017-11-16 09:58:31 +01:00
annotationmodel.h Q_DECL_OVERRIDE -> override 2017-03-02 20:39:24 +01:00
annotationpopup.cpp clang-tidy: modernize-use-nullptr run 2017-09-06 00:19:48 +02:00
annotationpopup.h clang-tidy: modernize-use-nullptr run 2017-09-06 00:19:48 +02:00
annotationpropertiesdialog.cpp Fix includes 2015-02-07 13:16:07 +01:00
annotationpropertiesdialog.h Port away from signal/slot keyword 2016-07-11 19:34:08 +02:00
annotationproxymodels.cpp Change annotation type name when an annotation is associated to non-empty popup 2018-04-20 19:43:14 +02:00
annotationproxymodels.h Change annotation type name when an annotation is associated to non-empty popup 2018-04-20 19:43:14 +02:00
annotationtools.cpp clang-tidy: modernize-use-nullptr run 2017-09-06 00:19:48 +02:00
annotationtools.h Q_DECL_OVERRIDE -> override 2017-03-02 20:39:24 +01:00
annotationwidgets.cpp clang-tidy: modernize-use-nullptr run 2017-09-06 00:19:48 +02:00
annotationwidgets.h virtual override -> override 2017-03-02 20:40:09 +01:00
annotwindow.cpp Raise annotation window when clicking on annotation 2018-05-18 15:17:58 +02:00
annotwindow.h The work in this branch was sponsored by LiMux 2017-11-16 09:58:31 +01:00
bookmarklist.cpp Merge remote-tracking branch 'origin/master' into dont-use-docdata-for-annots-and-forms 2017-09-11 19:51:51 +02:00
bookmarklist.h Q_DECL_OVERRIDE -> override 2017-03-02 20:39:24 +01:00
CMakeLists.txt clean up the CMakeLists.txt files from the auto* stuff 2006-07-07 15:08:46 +00:00
debug_ui.cpp Only show warning messages by default 2017-01-16 18:41:33 +01:00
debug_ui.h Use categorized logging 2014-09-16 23:24:36 +02:00
drawingtoolactions.cpp Fixes suggested by Clazy 2016-10-29 16:33:05 +02:00
drawingtoolactions.h Port away from signal/slot keyword 2016-07-11 19:34:08 +02:00
embeddedfilesdialog.cpp Fixes suggested by Clazy 2016-10-29 16:33:05 +02:00
embeddedfilesdialog.h Merge remote-tracking branch 'origin/master' into frameworks 2016-10-29 11:13:24 +02:00
fileprinterpreview.cpp clang-tidy: modernize-use-nullptr run 2017-09-06 00:19:48 +02:00
fileprinterpreview.h Q_DECL_OVERRIDE -> override 2017-03-02 20:39:24 +01:00
findbar.cpp Allow to disable automatic search while typing 2017-03-14 00:31:42 +01:00
findbar.h Allow to disable automatic search while typing 2017-03-14 00:31:42 +01:00
formwidgets.cpp Fix crash on shutdown when having edited text forms 2018-07-28 22:39:30 +02:00
formwidgets.h Fix crash on shutdown when having edited text forms 2018-07-28 22:39:30 +02:00
guiutils.cpp Change annotation type name when an annotation is associated to non-empty popup 2018-04-20 19:43:14 +02:00
guiutils.h Merge remote-tracking branch 'origin/master' into frameworks 2016-10-29 11:13:24 +02:00
ktreeviewsearchline.cpp clang-tidy: modernize-use-nullptr run 2017-09-06 00:19:48 +02:00
ktreeviewsearchline.h clang-tidy: modernize-use-nullptr run 2017-09-06 00:19:48 +02:00
latexrenderer.cpp ui: Fix build without implicit cast to/from ascii 2016-07-11 22:05:18 +02:00
latexrenderer.h Remove some unused #includes 2013-10-14 20:42:34 +02:00
layers.cpp Port away from deprecated KConfig API 2016-07-24 22:43:41 +02:00
layers.h Add override 2017-03-02 20:38:50 +01:00
magnifierview.cpp clang-tidy: modernize-use-nullptr run 2017-09-06 00:19:48 +02:00
magnifierview.h Q_DECL_OVERRIDE -> override 2017-03-02 20:39:24 +01:00
minibar.cpp clang-tidy: modernize-use-nullptr run 2017-09-06 00:19:48 +02:00
minibar.h Q_DECL_OVERRIDE -> override 2017-03-02 20:39:24 +01:00
okmenutitle.cpp Fix menu titles not showing up 2016-12-28 17:05:46 +01:00
okmenutitle.h Fix menu titles not showing up 2016-12-28 17:05:46 +01:00
pageitemdelegate.cpp Replace obsolete typedefs 2016-07-11 23:24:47 +02:00
pageitemdelegate.h Q_DECL_OVERRIDE -> override 2017-03-02 20:39:24 +01:00
pagepainter.cpp Draw a dark rectangle around highlighted search results 2018-05-18 17:27:28 +02:00
pagepainter.h HiDPI Support for Okular 2017-10-14 14:47:20 +02:00
pagesizelabel.cpp Use moc include style dictated by automoc 2014-08-09 00:21:03 +02:00
pagesizelabel.h Q_DECL_OVERRIDE -> override 2017-03-02 20:39:24 +01:00
pageview.cpp Expose 'change colors' through dbus interface 2018-06-26 13:05:45 +02:00
pageview.h Expose 'change colors' through dbus interface 2018-06-26 13:05:45 +02:00
pageviewannotator.cpp use correct filepath 2018-04-07 01:14:50 +02:00
pageviewannotator.h Port away from signal/slot keyword 2016-07-11 19:34:08 +02:00
pageviewmouseannotation.cpp Fix crash due to dangling pointer in MouseAnnotation 2018-02-25 19:11:17 +01:00
pageviewmouseannotation.h Fix crash due to dangling pointer in MouseAnnotation 2018-02-25 19:11:17 +01:00
pageviewutils.cpp Access readOnly state of FormWidgets dynamically 2018-03-20 23:14:12 +01:00
pageviewutils.h The work in this branch was sponsored by LiMux 2017-11-16 09:58:31 +01:00
presentationsearchbar.cpp Added missing overrides found by clang-tidy 2016-10-29 17:07:10 +02:00
presentationsearchbar.h Q_DECL_OVERRIDE -> override 2017-03-02 20:39:24 +01:00
presentationwidget.cpp HiDPI Support for Okular 2017-10-14 14:47:20 +02:00
presentationwidget.h clang-tidy: modernize-use-nullptr run 2017-09-06 00:19:48 +02:00
priorities.h Remove the concept of observer/view id 2013-02-24 23:01:02 +01:00
propertiesdialog.cpp clang-tidy: modernize-use-nullptr run 2017-09-06 00:19:48 +02:00
propertiesdialog.h Q_DECL_OVERRIDE -> override 2017-03-02 20:39:24 +01:00
searchlineedit.cpp Merge branch 'Applications/17.08' 2017-09-26 23:55:00 +02:00
searchlineedit.h Allow to disable automatic search while typing 2017-03-14 00:31:42 +01:00
searchwidget.cpp Use QStringLiteral 2015-10-29 13:37:11 +01:00
searchwidget.h Port away from signal/slot keyword 2016-07-11 19:34:08 +02:00
side_reviews.cpp clang-tidy: modernize-use-nullptr run 2017-09-06 00:19:48 +02:00
side_reviews.h Q_DECL_OVERRIDE -> override 2017-03-02 20:39:24 +01:00
sidebar.cpp Merge remote-tracking branch 'origin/Applications/17.08' 2017-09-22 09:39:45 -06:00
sidebar.h Fix problem of saving pdf switches from thumbnail view in sidebar to contents view 2018-08-13 11:13:00 +02:00
snapshottaker.cpp clang-tidy: modernize-use-nullptr run 2017-09-06 00:19:48 +02:00
snapshottaker.h Q_NULLPTR -> nullptr 2017-03-02 20:09:32 +01:00
thumbnaillist.cpp clang-tidy: modernize-use-nullptr run 2017-09-06 00:19:48 +02:00
thumbnaillist.h Q_DECL_OVERRIDE -> override 2017-03-02 20:39:24 +01:00
toc.cpp clang-tidy: modernize-use-nullptr run 2017-09-06 00:19:48 +02:00
toc.h Allow to create bookmarks from the TOC 2017-03-23 01:22:08 +01:00
tocmodel.cpp clang-tidy: modernize-use-nullptr run 2017-09-06 00:19:48 +02:00
tocmodel.h Q_DECL_OVERRIDE -> override 2017-03-02 20:39:24 +01:00
toolaction.cpp clang-tidy: modernize-use-nullptr run 2017-09-06 00:19:48 +02:00
toolaction.h Q_DECL_OVERRIDE -> override 2017-03-02 20:39:24 +01:00
tts.cpp clang-tidy: modernize-use-nullptr run 2017-09-06 00:19:48 +02:00
tts.h Q_NULLPTR -> nullptr 2017-03-02 20:09:32 +01:00
url_utils.h ui: Fix build without implicit cast to/from ascii 2016-07-11 22:05:18 +02:00
videowidget.cpp Fix Presentation Mode VideoWidget sizing 2018-04-02 21:21:09 +02:00
videowidget.h Q_DECL_OVERRIDE -> override 2017-03-02 20:39:24 +01:00