Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [session] Add auto-close dialog after session switch #1033

Merged
merged 1 commit into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/plugins/core/session/sessiondialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ void SessionDialog::initUI()
void SessionDialog::initConnect()
{
connect(view, &SessionListView::sessionsSelected, this, &SessionDialog::updateOptions);
connect(view, &SessionListView::sessionSwitched, this, &SessionDialog::close);
connect(addBtn, &DIconButton::clicked, view, &SessionListView::createSession);
connect(renameBtn, &DIconButton::clicked, view, &SessionListView::renameCurrentSession);
connect(cloneBtn, &DIconButton::clicked, view, &SessionListView::cloneCurrentSession);
Expand Down
1 change: 1 addition & 0 deletions src/plugins/core/session/sessionlistview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ void SessionListView::switchToCurrentSession()
{
const auto session = currentSession();
SessionManager::instance()->loadSession(session);
Q_EMIT sessionSwitched();
}

void SessionListView::showEvent(QShowEvent *event)
Expand Down
1 change: 1 addition & 0 deletions src/plugins/core/session/sessionlistview.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public Q_SLOTS:
Q_SIGNALS:
void sessionsSelected(const QStringList &sessions);
void sessionCreated(const QString &session);
void sessionSwitched();

private:
void initUI();
Expand Down
Loading