Don't try to close ConstantBufferPreviewer window when loading capture

This commit is contained in:
baldurk
2019-07-12 12:22:06 +01:00
parent 16982d8b4a
commit dfe84e962b
2 changed files with 11 additions and 3 deletions
@@ -82,17 +82,22 @@ ConstantBufferPreviewer *ConstantBufferPreviewer::has(ShaderStage stage, uint32_
void ConstantBufferPreviewer::OnCaptureLoaded()
{
OnCaptureClosed();
Reset();
}
void ConstantBufferPreviewer::OnCaptureClosed()
{
Reset();
ToolWindowManager::closeToolWindow(this);
}
void ConstantBufferPreviewer::Reset()
{
ui->variables->clear();
ui->variables->clearInternalExpansions();
ui->saveCSV->setEnabled(false);
ToolWindowManager::closeToolWindow(this);
}
void ConstantBufferPreviewer::OnEventChanged(uint32_t eventId)
@@ -52,6 +52,7 @@ public:
// ICaptureViewer
void OnCaptureLoaded() override;
void OnCaptureClosed() override;
void OnSelectedEventChanged(uint32_t eventId) override {}
void OnEventChanged(uint32_t eventId) override;
@@ -65,6 +66,8 @@ private slots:
void processFormat(const QString &format);
private:
void Reset();
Ui::ConstantBufferPreviewer *ui;
ICaptureContext &m_Ctx;