mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-01 04:10:58 +00:00
Ensure consistency when saving the current capture. Closes #2358
* If we save the current capture from a connection window we want to do that via the main window so the UI can be properly updated and so we can save it properly through the replay manager, so the old one can be removed safely.
This commit is contained in:
@@ -1004,27 +1004,32 @@ bool MainWindow::PromptSaveCaptureAs()
|
||||
QString saveFilename = GetSavePath();
|
||||
|
||||
if(!saveFilename.isEmpty())
|
||||
{
|
||||
QString origFilename = m_Ctx.GetCaptureFilename();
|
||||
|
||||
bool success = m_Ctx.SaveCaptureTo(saveFilename);
|
||||
|
||||
if(!success)
|
||||
return false;
|
||||
|
||||
AddRecentFile(m_Ctx.Config().RecentCaptureFiles, saveFilename);
|
||||
PopulateRecentCaptureFiles();
|
||||
SetTitle(saveFilename);
|
||||
|
||||
for(LiveCapture *live : m_LiveCaptures)
|
||||
live->fileSaved(origFilename, saveFilename);
|
||||
|
||||
return true;
|
||||
}
|
||||
return SaveCurrentCapture(saveFilename);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MainWindow::SaveCurrentCapture(QString saveFilename)
|
||||
{
|
||||
QString origFilename = m_Ctx.GetCaptureFilename();
|
||||
|
||||
bool success = m_Ctx.SaveCaptureTo(saveFilename);
|
||||
|
||||
if(!success)
|
||||
return false;
|
||||
|
||||
AddRecentFile(m_Ctx.Config().RecentCaptureFiles, saveFilename);
|
||||
PopulateRecentCaptureFiles();
|
||||
SetTitle(saveFilename);
|
||||
|
||||
for(LiveCapture *live : m_LiveCaptures)
|
||||
live->fileSaved(origFilename, saveFilename);
|
||||
|
||||
ui->action_Save_Capture_Inplace->setEnabled(false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void MainWindow::exportCapture(const CaptureFileFormat &fmt)
|
||||
{
|
||||
if(!m_Ctx.IsCaptureLocal())
|
||||
|
||||
Reference in New Issue
Block a user