Skip to content

Commit

Permalink
ui: fix unwanted tab to be removed
Browse files Browse the repository at this point in the history
  • Loading branch information
mcallegari committed Aug 26, 2017
1 parent c3f0330 commit c3a54b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions ui/src/app.cpp
Expand Up @@ -1167,8 +1167,6 @@ void App::slotDetachContext(int index)

connect(detachedWindow, SIGNAL(closing()),
this, SLOT(slotReattachContext()));

m_tab->removeTab(index);
}

void App::slotReattachContext()
Expand Down
3 changes: 2 additions & 1 deletion ui/src/app.h
Expand Up @@ -60,11 +60,12 @@ class DetachedContext : public QMainWindow
DetachedContext() {}

protected slots:
void closeEvent(QCloseEvent *)
void closeEvent(QCloseEvent *ev)
{
emit closing();
// avoid the real context to be destroyed !
setCentralWidget(NULL);
QMainWindow::closeEvent(ev);
}

signals:
Expand Down

0 comments on commit c3a54b5

Please sign in to comment.