mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-08-17 17:31:44 +08:00
Update release
This commit is contained in:
@@ -541,26 +541,7 @@ UnitTestSnapshotViewerAppWindow
|
||||
{
|
||||
labelLoading->SetVisible(true);
|
||||
scRendering->SetVisible(false);
|
||||
|
||||
struct LoadingContext
|
||||
{
|
||||
vint version;
|
||||
Ptr<EventHandler> handler;
|
||||
};
|
||||
auto context = Ptr(new LoadingContext);
|
||||
context->version = ++loadingFrameVersion;
|
||||
context->handler = frame->DomChanged.Add([=, this]()
|
||||
{
|
||||
if (context->version == loadingFrameVersion)
|
||||
{
|
||||
loadDom();
|
||||
GetApplication()->InvokeInMainThread(GetApplication()->GetMainWindow(), [=]()
|
||||
{
|
||||
frame->DomChanged.Remove(context->handler);
|
||||
context->handler = {};
|
||||
});
|
||||
}
|
||||
});
|
||||
__vwsn::EventAttachOnce(frame->DomChanged, loadDom, loadingFrameVersion);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -677,6 +658,7 @@ UnitTestSnapshotViewerAppWindow
|
||||
|
||||
UnitTestSnapshotViewerAppWindow::UnitTestSnapshotViewerAppWindow(Ptr<UnitTestSnapshotViewerViewModel> viewModel)
|
||||
: UnitTestSnapshotViewerWindow(viewModel)
|
||||
, loadingFrameVersion(Ptr(new reflection::description::Versioning))
|
||||
{
|
||||
textListFrames->SelectionChanged.AttachMethod(this, &UnitTestSnapshotViewerAppWindow::textListFrames_SelectionChanged);
|
||||
treeViewDom->SelectionChanged.AttachMethod(this, &UnitTestSnapshotViewerAppWindow::treeViewDom_SelectionChanged);
|
||||
|
||||
Reference in New Issue
Block a user