mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-27 17:21:11 +00:00
fixResetReqBugs
Signed-off-by: hw_wyx <wuyinxiao@huawei.com> Change-Id: Id94aa2ea2ef5c1fca4c9f8db935325e9394ef49c
This commit is contained in:
parent
f42a5b234b
commit
89086303bb
@ -132,6 +132,19 @@ void ImageModelNG::ResetImage()
|
||||
CHECK_NULL_VOID(pattern);
|
||||
pattern->SetNeedLoadAlt(false);
|
||||
pattern->ResetImageAndAlt();
|
||||
if (pattern->GetImageType() == ImagePattern::ImageType::ANIMATION) {
|
||||
if (pattern->GetHasSizeChanged()) {
|
||||
pattern->ResetPictureSize();
|
||||
}
|
||||
pattern->StopAnimation();
|
||||
pattern->ResetImages();
|
||||
if (!frameNode->GetChildren().empty()) {
|
||||
auto imageFrameNode = AceType::DynamicCast<FrameNode>(frameNode->GetChildren().front());
|
||||
ACE_RESET_NODE_LAYOUT_PROPERTY(ImageLayoutProperty, ImageSourceInfo, imageFrameNode);
|
||||
frameNode->RemoveChild(imageFrameNode);
|
||||
}
|
||||
pattern->SetImageType(ImagePattern::ImageType::BASE);
|
||||
}
|
||||
}
|
||||
|
||||
void ImageModelNG::ResetImage(FrameNode* frameNode)
|
||||
|
@ -520,7 +520,7 @@ RefPtr<NodePaintMethod> ImagePattern::CreateNodePaintMethod()
|
||||
return MakeRefPtr<ImagePaintMethod>(
|
||||
obscuredImage_, isSelected_, overlayMod_, sensitive, interpolationDefault_);
|
||||
}
|
||||
return nullptr;
|
||||
return MakeRefPtr<ImagePaintMethod>(nullptr, isSelected_, overlayMod_, sensitive, interpolationDefault_);
|
||||
}
|
||||
|
||||
bool ImagePattern::OnDirtyLayoutWrapperSwap(const RefPtr<LayoutWrapper>& dirty, const DirtySwapConfig& config)
|
||||
@ -2027,6 +2027,8 @@ void ImagePattern::ResetImageAndAlt()
|
||||
auto rsRenderContext = frameNode->GetRenderContext();
|
||||
CHECK_NULL_VOID(rsRenderContext);
|
||||
rsRenderContext->ClearDrawCommands();
|
||||
CloseSelectOverlay();
|
||||
DestroyAnalyzerOverlay();
|
||||
frameNode->MarkDirtyNode(PROPERTY_UPDATE_RENDER);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user