Hide isolation option when there is only one mesh in the model.
This commit is contained in:
parent
64ef4491cb
commit
bffb791696
@ -213,6 +213,11 @@ OV.Navigator = class
|
||||
this.UpdateInfoPanel ();
|
||||
this.Resize ();
|
||||
}
|
||||
|
||||
MeshCount ()
|
||||
{
|
||||
return this.modelData.MeshCount ();
|
||||
}
|
||||
|
||||
IsMeshVisible (meshIndex)
|
||||
{
|
||||
|
||||
@ -165,7 +165,6 @@ OV.Website = class
|
||||
}
|
||||
} else {
|
||||
let meshIndex = meshUserData.originalMeshIndex;
|
||||
let isMeshIsolated = this.navigator.IsMeshIsolated (meshIndex);
|
||||
items.push ({
|
||||
name : 'Hide mesh',
|
||||
icon : 'assets/images/context/hide.svg',
|
||||
@ -180,13 +179,16 @@ OV.Website = class
|
||||
this.navigator.FitMeshToWindow (meshIndex);
|
||||
}
|
||||
});
|
||||
items.push ({
|
||||
name : isMeshIsolated ? 'Remove isolation' : 'Isolate mesh',
|
||||
icon : isMeshIsolated ? 'assets/images/context/deisolate.svg' : 'assets/images/context/isolate.svg',
|
||||
onClick : () => {
|
||||
this.navigator.IsolateMesh (meshIndex);
|
||||
}
|
||||
});
|
||||
if (this.navigator.MeshCount () > 1) {
|
||||
let isMeshIsolated = this.navigator.IsMeshIsolated (meshIndex);
|
||||
items.push ({
|
||||
name : isMeshIsolated ? 'Remove isolation' : 'Isolate mesh',
|
||||
icon : isMeshIsolated ? 'assets/images/context/deisolate.svg' : 'assets/images/context/isolate.svg',
|
||||
onClick : () => {
|
||||
this.navigator.IsolateMesh (meshIndex);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
this.dialog = OV.ShowListPopup (items, {
|
||||
calculatePosition : (contentDiv) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user