Skip to content

Commit

Permalink
Fix DockWidgets to close with associated Profile.
Browse files Browse the repository at this point in the history
  • Loading branch information
itsTheFae authored and vadi2 committed May 3, 2017
1 parent 6796863 commit da9cf5e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/mudlet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -700,12 +700,17 @@ void mudlet::slot_close_profile_requested( int tab )
Host* pH = getHostManager().getHost(name);
if( ! pH ) return;

QMap<QString, TDockWidget *> & dockWindowMap = mHostDockConsoleMap[pH];

if( ! pH->mpConsole->close() )
return;
else
pH->mpConsole->mUserAgreedToCloseConsole = true;
pH->stopAllTriggers();
pH->mpEditorDialog->close();
for( auto dockName : dockWindowMap.keys() ) {
dockWindowMap[dockName]->close();
}
mConsoleMap[pH]->close();
if( mTabMap.contains( pH->getName() ) )
{
Expand Down Expand Up @@ -734,8 +739,12 @@ void mudlet::slot_close_profile()
Host * pH = mpCurrentActiveHost;
if( pH )
{
QMap<QString, TDockWidget *> & dockWindowMap = mHostDockConsoleMap[pH];
QString name = pH->getName();
mpCurrentActiveHost->mpEditorDialog->close();
for( auto dockName : dockWindowMap.keys() ) {
dockWindowMap[dockName]->close();
}
mConsoleMap[ pH ]->close();
if( mTabMap.contains( name ) )
{
Expand Down

0 comments on commit da9cf5e

Please sign in to comment.