mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Add checks of any current captures or temp logs when closing main window
This commit is contained in:
@@ -66,8 +66,10 @@ private slots:
|
||||
void on_previewSplit_splitterMoved(int pos, int index);
|
||||
|
||||
// manual slots
|
||||
public slots:
|
||||
bool checkAllowClose();
|
||||
|
||||
private slots:
|
||||
void childUpdate();
|
||||
void captureCountdownTick();
|
||||
|
||||
|
||||
@@ -973,6 +973,27 @@ void MainWindow::loadLayout_triggered()
|
||||
|
||||
void MainWindow::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
for(LiveCapture *live : m_LiveCaptures)
|
||||
{
|
||||
if(!live->checkAllowClose())
|
||||
{
|
||||
event->ignore();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(!PromptCloseLog())
|
||||
{
|
||||
event->ignore();
|
||||
return;
|
||||
}
|
||||
|
||||
for(LiveCapture *live : m_LiveCaptures)
|
||||
{
|
||||
live->cleanItems();
|
||||
live->close();
|
||||
}
|
||||
|
||||
SaveLayout(0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user