B2020-019: Annotation text can be edited for checked out procedure when displayed via Search Annotations
This commit is contained in:
parent
35bc08e466
commit
22d691cdd5
@ -1124,10 +1124,15 @@ namespace Volian.Controls.Library
|
|||||||
_ItemInfo = lbSrchResults.SelectedValue as ItemInfo;
|
_ItemInfo = lbSrchResults.SelectedValue as ItemInfo;
|
||||||
if ((tabSearchTypes.SelectedTab == tabSearchTypes.Tabs[1]) && (_ItemInfo != null))
|
if ((tabSearchTypes.SelectedTab == tabSearchTypes.Tabs[1]) && (_ItemInfo != null))
|
||||||
{
|
{
|
||||||
_AnnotationDetails.CurrentAnnotation = AnnotationInfo.Get(_ItemInfo.SearchAnnotationID);
|
// B2020-019: Don't set the CurrentAnnotation to an annotation in a procedure that cannot be opened.
|
||||||
if (_AnnotationDetails.CurrentAnnotation != null)
|
AnnotationInfo tmpca = AnnotationInfo.Get(_ItemInfo.SearchAnnotationID);
|
||||||
_TabControl.OpenItem(_AnnotationDetails.CurrentAnnotation.MyItem); // open the corresponding procedure text
|
DisplayTabItem dti = null;
|
||||||
_AnnotationDetails.FindCurrentAnnotation(); // position to corresponding row in annotation grid
|
if (tmpca != null) dti = _TabControl.OpenItem(tmpca.MyItem); // open the corresponding procedure text
|
||||||
|
if (dti != null)
|
||||||
|
{
|
||||||
|
_AnnotationDetails.CurrentAnnotation = tmpca;
|
||||||
|
_AnnotationDetails.FindCurrentAnnotation(); // position to corresponding row in annotation grid
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user