Commit afe5ce7c authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

MainWindow: Simplify views management

Removes unnecessary look-ups
parent 422a1e96
......@@ -598,8 +598,7 @@ void MainWindow::closeTab(int index)
bool isNewConnectionPage = widget == m_newConnectionWidget;
if (!isNewConnectionPage) {
RemoteView *view = m_remoteViewMap.value(widget);
m_remoteViewMap.remove(m_remoteViewMap.key(view));
RemoteView *view = m_remoteViewMap.take(widget);
view->startQuitting();
widget->deleteLater();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment