Canvas: Fix exit panel edit mode issue (#69315)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
Nathan Marrs 2023-05-31 15:31:10 -07:00 committed by GitHub
parent 293993ac09
commit 186cd96447
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 7 deletions

View File

@ -643,8 +643,8 @@ export class Scene {
render() {
const canShowContextMenu = this.isPanelEditing || (!this.isPanelEditing && this.isEditingEnabled);
const canShowElementTooltip =
!this.isEditingEnabled && this.tooltip?.element && this.tooltip.element.data.links?.length > 0;
const isTooltipValid = (this.tooltip?.element?.data?.links?.length ?? 0) > 0;
const canShowElementTooltip = !this.isEditingEnabled && isTooltipValid;
return (
<div key={this.revId} className={this.styles.wrap} style={this.style} ref={this.setRef}>

View File

@ -90,11 +90,6 @@ export class CanvasPanel extends Component<Props, State> {
if (this.props.id === evt.payload) {
this.needsReload = true;
this.scene.clearCurrentSelection();
this.scene.load(
this.props.options.root,
this.props.options.inlineEditing,
this.props.options.showAdvancedTypes
);
}
})
);