Home
Phabricator
Search
Log In
Paste
P169
Masterwork From Distant Lands
Active
Public
Actions
Authored by
rkflx
on Feb 22 2018, 3:00 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp
index 44b69088..d004316d 100644
--- a/app/mainwindow.cpp
+++ b/app/mainwindow.cpp
@@ -521,6 +521,10 @@ struct MainWindow::Private
FileOpsContextManagerItem* fileOpsItem = new FileOpsContextManagerItem(mContextManager, mThumbnailView, actionCollection, q);
// Fill sidebar
+
+ // <comment>
+ SignalBlocker blocker(mSideBar->tabBar());
+
SideBarPage* page;
page = new SideBarPage(i18n("Folders"));
page->setObjectName(QLatin1String("folders"));
diff --git a/app/sidebar.cpp b/app/sidebar.cpp
index 0faac954..16c400e6 100644
--- a/app/sidebar.cpp
+++ b/app/sidebar.cpp
@@ -219,6 +219,10 @@ SideBar::SideBar(QWidget* parent)
tabBar()->setFocusPolicy(Qt::NoFocus);
setTabPosition(QTabWidget::South);
setElideMode(Qt::ElideRight);
+
+ connect(tabBar(), &QTabBar::currentChanged, [=]() {
+ GwenviewConfig::setSideBarPage(currentPage());
+ });
}
SideBar::~SideBar()
@@ -234,13 +238,6 @@ QSize SideBar::sizeHint() const
void SideBar::addPage(SideBarPage* page)
{
addTab(page, page->title());
-
- if (count() == 1) {
- // Don't connect before first addTab() since it emits currentChanged()
- connect(tabBar(), &QTabBar::currentChanged, [=]() {
- GwenviewConfig::setSideBarPage(currentPage());
- });
- }
}
QString SideBar::currentPage() const
rkflx
edited the content of this paste.
(Show Details)
Feb 22 2018, 3:00 PM
rkflx
changed the title of this paste from untitled to
Masterwork From Distant Lands
.
rkflx
updated the paste's language from
autodetect
to
autodetect
.
rkflx
mentioned this in
D10687: Adjust sidebar code and config entries to statusbar
.
Feb 22 2018, 3:01 PM
Log In to Comment