┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2008-12-21 10:15:19 +0000
committerPeter Penz <[email protected]>2008-12-21 10:15:19 +0000
commit17033c5da6c60d37ded588ea0fa44f73bd85dc1d (patch)
tree69571a96038daf5b135278f14addaed365275e5c
parent88ae4d94bc7003206344f0dcea5bd06ad74fd36c (diff)
When common view properties are used for all folders, the internal properties should not be changed during the lifetime of a DolphinView instance. This allows to e. g. split a view and work with different view modes on each view.
BUG: 174102 svn path=/trunk/KDE/kdebase/apps/; revision=899571
-rw-r--r--src/dolphinview.cpp14
-rw-r--r--src/dolphinview.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp
index b1c0bf743..0bd24ecb3 100644
--- a/src/dolphinview.cpp
+++ b/src/dolphinview.cpp
@@ -87,6 +87,7 @@ DolphinView::DolphinView(QWidget* parent,
m_storedCategorizedSorting(false),
m_tabsForFiles(false),
m_isContextMenuOpen(false),
+ m_ignoreViewProperties(false),
m_mode(DolphinView::IconsView),
m_topLayout(0),
m_controller(0),
@@ -455,6 +456,8 @@ void DolphinView::reload()
void DolphinView::refresh()
{
+ m_ignoreViewProperties = false;
+
const bool oldActivationState = m_active;
const int oldZoomLevel = m_controller->zoomLevel();
m_active = true;
@@ -1153,6 +1156,10 @@ KUrl DolphinView::viewPropertiesUrl() const
void DolphinView::applyViewProperties(const KUrl& url)
{
+ if (m_ignoreViewProperties) {
+ return;
+ }
+
if (isColumnViewActive() && rootUrl().isParentOf(url)) {
// The column view is active, hence don't apply the view properties
// of sub directories (represented by columns) to the view. The
@@ -1222,6 +1229,13 @@ void DolphinView::applyViewProperties(const KUrl& url)
// the used zoom level of the controller must be adjusted manually:
updateZoomLevel(oldZoomLevel);
}
+
+ if (DolphinSettings::instance().generalSettings()->globalViewProps()) {
+ // During the lifetime of a DolphinView instance the global view properties
+ // should not be changed. This allows e. g. to split a view and use different
+ // view properties for each view.
+ m_ignoreViewProperties = true;
+ }
}
void DolphinView::createView()
diff --git a/src/dolphinview.h b/src/dolphinview.h
index 1852e784a..d558b4c5a 100644
--- a/src/dolphinview.h
+++ b/src/dolphinview.h
@@ -717,6 +717,7 @@ private:
bool m_storedCategorizedSorting : 1;
bool m_tabsForFiles : 1;
bool m_isContextMenuOpen : 1; // TODO: workaround for Qt-issue 207192
+ bool m_ignoreViewProperties : 1;
Mode m_mode;