GUI: close all source tabs on termination (closes #1443)
This commit is contained in:
parent
c05bcd401a
commit
f17d1756a6
|
@ -17,6 +17,7 @@ SourceViewerManager::SourceViewerManager(QWidget* parent) : QTabWidget(parent)
|
|||
|
||||
connect(this, SIGNAL(tabCloseRequested(int)), this, SLOT(closeTab(int)));
|
||||
connect(Bridge::getBridge(), SIGNAL(loadSourceFile(QString, int, int)), this, SLOT(loadSourceFile(QString, int, int)));
|
||||
connect(Bridge::getBridge(), SIGNAL(dbgStateChanged(DBGSTATE)), this, SLOT(dbgStateChanged(DBGSTATE)));
|
||||
}
|
||||
|
||||
void SourceViewerManager::loadSourceFile(QString path, int line, int selection)
|
||||
|
@ -58,3 +59,9 @@ void SourceViewerManager::closeAllTabs()
|
|||
{
|
||||
clear();
|
||||
}
|
||||
|
||||
void SourceViewerManager::dbgStateChanged(DBGSTATE state)
|
||||
{
|
||||
if(state == stopped)
|
||||
closeAllTabs();
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ public slots:
|
|||
void loadSourceFile(QString path, int line, int selection = 0);
|
||||
void closeTab(int index);
|
||||
void closeAllTabs();
|
||||
void dbgStateChanged(DBGSTATE state);
|
||||
|
||||
private:
|
||||
QPushButton* mCloseAllTabs;
|
||||
|
|
Loading…
Reference in New Issue