mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-23 14:15:42 +00:00
Persist the mesh view's dock layout between sessions
This commit is contained in:
@@ -1438,6 +1438,20 @@ void BufferViewer::OnEventChanged(uint32_t eventID)
|
||||
});
|
||||
}
|
||||
|
||||
QVariant BufferViewer::persistData()
|
||||
{
|
||||
QVariantMap state = ui->dockarea->saveState();
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
void BufferViewer::setPersistData(const QVariant &persistData)
|
||||
{
|
||||
QVariantMap state = persistData.toMap();
|
||||
|
||||
ui->dockarea->restoreState(state);
|
||||
}
|
||||
|
||||
void BufferViewer::RT_FetchMeshData(IReplayController *r)
|
||||
{
|
||||
const DrawcallDescription *draw = m_Ctx.CurDrawcall();
|
||||
|
||||
@@ -56,6 +56,8 @@ class BufferViewer : public QFrame, public IBufferViewer, public ILogViewer
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QVariant persistData READ persistData WRITE setPersistData DESIGNABLE false SCRIPTABLE false)
|
||||
|
||||
public:
|
||||
explicit BufferViewer(ICaptureContext &ctx, bool meshview, QWidget *parent = 0);
|
||||
~BufferViewer();
|
||||
@@ -82,6 +84,9 @@ public:
|
||||
void OnSelectedEventChanged(uint32_t eventID) override {}
|
||||
void OnEventChanged(uint32_t eventID) override;
|
||||
|
||||
QVariant persistData();
|
||||
void setPersistData(const QVariant &persistData);
|
||||
|
||||
private slots:
|
||||
// automatic slots
|
||||
void on_outputTabs_currentChanged(int index);
|
||||
|
||||
Reference in New Issue
Block a user