diff options
| author | Peter Penz <[email protected]> | 2007-05-06 20:46:01 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-05-06 20:46:01 +0000 |
| commit | 44057746474840bdc983229ce02234ebe4f201d3 (patch) | |
| tree | 31ca6787ac07773770ee7f0328ed320ea04ce3a8 | |
| parent | cdcb4b0166aefdd382d20e7ff3b5cb217ba54ba8 (diff) | |
optimization: don't try to show the meta information if the widget is invisible
svn path=/trunk/KDE/kdebase/apps/; revision=661864
| -rw-r--r-- | src/infosidebarpage.cpp | 10 | ||||
| -rw-r--r-- | src/infosidebarpage.h | 4 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/infosidebarpage.cpp b/src/infosidebarpage.cpp index 530d1fb30..d900945e8 100644 --- a/src/infosidebarpage.cpp +++ b/src/infosidebarpage.cpp @@ -130,6 +130,12 @@ void InfoSidebarPage::setSelection(const KFileItemList& selection) showItemInfo(); } +void InfoSidebarPage::showEvent(QShowEvent* event) +{ + SidebarPage::showEvent(event); + showItemInfo(); +} + void InfoSidebarPage::requestDelayedItemInfo(const KUrl& url) { cancelRequest(); @@ -143,6 +149,10 @@ void InfoSidebarPage::requestDelayedItemInfo(const KUrl& url) void InfoSidebarPage::showItemInfo() { + if (!isVisible()) { + return; + } + cancelRequest(); const KFileItemList& selectedItems = selection(); diff --git a/src/infosidebarpage.h b/src/infosidebarpage.h index ffa18d497..2a0f2ead7 100644 --- a/src/infosidebarpage.h +++ b/src/infosidebarpage.h @@ -63,6 +63,10 @@ public slots: virtual void setUrl(const KUrl& url); virtual void setSelection(const KFileItemList& selection); +protected: + /** @see QWidget::showEvent() */ + virtual void showEvent(QShowEvent* event); + private slots: /** * Does a delayed request of information for the item of the given Url and |
