Skip to content
  • Ahmad Osama's avatar
    Fix problem of saving pdf switches from thumbnail view in sidebar to contents view · 5e622484
    Ahmad Osama authored and Albert Astals Cid's avatar Albert Astals Cid committed
    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
    5e622484