mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +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:
@@ -801,6 +801,16 @@ void LiveCapture::openCapture(Capture *cap)
|
||||
|
||||
bool LiveCapture::saveCapture(Capture *cap, QString path)
|
||||
{
|
||||
// if this is the current capture, do the save through the main window
|
||||
if(QString(m_Ctx.GetCaptureFilename()) == cap->path)
|
||||
{
|
||||
// if there's no target path, let the main window prompt for save.
|
||||
if(path.isEmpty())
|
||||
return m_Main->PromptSaveCaptureAs();
|
||||
else
|
||||
return m_Main->SaveCurrentCapture(path);
|
||||
}
|
||||
|
||||
if(path.isEmpty())
|
||||
{
|
||||
path = m_Main->GetSavePath();
|
||||
|
||||
Reference in New Issue
Block a user