From c4ecddd149c227ac5e1df977be5f2cf21aa15a93 Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Sat, 12 Feb 2005 14:34:12 +0000 Subject: [PATCH] Fixing the "can't hide left panel" bug. svn path=/trunk/kdegraphics/kpdf/; revision=388679 --- part.cpp | 16 ++++++++-------- part.h | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/part.cpp b/part.cpp index c394a779d..c36e26a92 100644 --- a/part.cpp +++ b/part.cpp @@ -119,13 +119,13 @@ Part::Part(QWidget *parentWidget, const char *widgetName, m_watchFile->setChecked( Settings::watchFile() ); // widgets: [left panel] | [] - QWidget * leftPanel = new QWidget( m_splitter ); - leftPanel->setMinimumWidth( 90 ); - leftPanel->setMaximumWidth( 300 ); - QVBoxLayout * leftPanelLayout = new QVBoxLayout( leftPanel ); + m_leftPanel = new QWidget( m_splitter ); + m_leftPanel->setMinimumWidth( 90 ); + m_leftPanel->setMaximumWidth( 300 ); + QVBoxLayout * leftPanelLayout = new QVBoxLayout( m_leftPanel ); // widgets: [left toolbox/..] | [] - m_toolBox = new QToolBox( leftPanel ); + m_toolBox = new QToolBox( m_leftPanel ); leftPanelLayout->addWidget( m_toolBox ); // [left toolbox: Table of Contents] | [] @@ -154,7 +154,7 @@ Part::Part(QWidget *parentWidget, const char *widgetName, m_toolBox->setItemEnabled( iIdx, false );*/ // widgets: [../miniBarContainer] | [] - QWidget * miniBarContainer = new QWidget( leftPanel ); + QWidget * miniBarContainer = new QWidget( m_leftPanel ); leftPanelLayout->addWidget( miniBarContainer ); QVBoxLayout * miniBarLayout = new QVBoxLayout( miniBarContainer ); // widgets: [../[spacer/..]] | [] @@ -575,10 +575,10 @@ void Part::slotNewConfig() // Left Panel and search Widget bool showLeft = Settings::showLeftPanel(); - if ( m_toolBox->isShown() != showLeft ) + if ( m_leftPanel->isShown() != showLeft ) { // show/hide left qtoolbox - m_toolBox->setShown( showLeft ); + m_leftPanel->setShown( showLeft ); // this needs to be hidden explicitly to disable thumbnails gen m_thumbnailList->setShown( showLeft ); } diff --git a/part.h b/part.h index a0e6ef947..f817774d5 100644 --- a/part.h +++ b/part.h @@ -121,6 +121,7 @@ private: // main widgets QSplitter *m_splitter; + QWidget *m_leftPanel; QToolBox *m_toolBox; SearchWidget *m_searchWidget; ThumbnailList *m_thumbnailList;