Skip to content

Commit f733d02

Browse files
committed
fix #29 - Can't get double click to boudingbox link element
1 parent c2bdfa9 commit f733d02

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

sources/RevitDBExplorer/Domain/DataModel/MembersOverrides/Element/Element_Geometry.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ private static bool CanBeSnoooped(Document document, Element element)
2424
{
2525
if (element.ViewSpecific)
2626
{
27-
var options = new Options() { View = document.ActiveView };
27+
var options = GetOptionsForView(document.ActiveView);
2828
var geometry = element.get_Geometry(options);
2929
var canBeSnooped = geometry != null;
3030
return canBeSnooped;
3131
}
3232
else
3333
{
3434
var geometry = element.get_Geometry(new Options());
35-
var geometryViewSpecific = element.get_Geometry(new Options() { View = document.ActiveView });
35+
var geometryViewSpecific = element.get_Geometry(GetOptionsForView(document.ActiveView));
3636
var canBeSnooped = geometry != null || geometryViewSpecific != null;
3737
return canBeSnooped;
3838
}
@@ -68,5 +68,14 @@ private static IEnumerable<SnoopableObject> GetGeometry(Document document, Eleme
6868
yield return snoopableObject;
6969
}
7070
}
71+
72+
private static Options GetOptionsForView(View view)
73+
{
74+
if (view != null)
75+
{
76+
return new Options() { View = view };
77+
}
78+
return new Options();
79+
}
7180
}
7281
}

0 commit comments

Comments
 (0)