mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-25 23:25:41 +00:00
Update capture connections when an open capture is saved. Closes #2352
This commit is contained in:
@@ -926,6 +926,21 @@ void LiveCapture::cleanItems()
|
||||
ui->captures->clear();
|
||||
}
|
||||
|
||||
void LiveCapture::fileSaved(QString from, QString to)
|
||||
{
|
||||
for(int i = 0; i < ui->captures->count(); i++)
|
||||
{
|
||||
Capture *cap = GetCapture(ui->captures->item(i));
|
||||
|
||||
if(cap->path == from)
|
||||
{
|
||||
cap->path = to;
|
||||
cap->saved = true;
|
||||
cap->local = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LiveCapture::previewToggle_toggled(bool checked)
|
||||
{
|
||||
if(m_IgnorePreviewToggle)
|
||||
|
||||
@@ -60,6 +60,7 @@ public:
|
||||
void QueueCapture(int frameNumber, int numFrames);
|
||||
const QString &hostname() { return m_Hostname; }
|
||||
void cleanItems();
|
||||
void fileSaved(QString from, QString to);
|
||||
|
||||
public slots:
|
||||
bool checkAllowClose();
|
||||
|
||||
@@ -1005,6 +1005,8 @@ bool MainWindow::PromptSaveCaptureAs()
|
||||
|
||||
if(!saveFilename.isEmpty())
|
||||
{
|
||||
QString origFilename = m_Ctx.GetCaptureFilename();
|
||||
|
||||
bool success = m_Ctx.SaveCaptureTo(saveFilename);
|
||||
|
||||
if(!success)
|
||||
@@ -1014,6 +1016,9 @@ bool MainWindow::PromptSaveCaptureAs()
|
||||
PopulateRecentCaptureFiles();
|
||||
SetTitle(saveFilename);
|
||||
|
||||
for(LiveCapture *live : m_LiveCaptures)
|
||||
live->fileSaved(origFilename, saveFilename);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user