Compare commits

...
6 Commits
3 changed files with 43 additions and 17 deletions

No files matched your search

+23 -11
View File
@@ -2426,9 +2426,10 @@ namespace VEPROMS
// when Word procedure tabs are restored. // when Word procedure tabs are restored.
// C2026-053 leaving this flag in her for now should we decide to trouble-shoot reopening of Word tabs later on. // C2026-053 leaving this flag in her for now should we decide to trouble-shoot reopening of Word tabs later on.
tc.LoadingSavedProcTabs = true; // we check for this flag in DSOTabPanel.cs when opening Word sections tc.LoadingSavedProcTabs = true; // we check for this flag in DSOTabPanel.cs when opening Word sections
EditItem LastEditItem = null; //to hold last edit item. Needed in case last tab is a Word Section
foreach (DataRow TabState in DisPlayTabState.Rows) foreach (DataRow TabState in DisPlayTabState.Rows)
{ {
int _ItemID = (int)TabState["ItemID"]; int _ItemID = (int)TabState["ItemID"];
ItemInfo _Procedure = ItemInfo.Get(_ItemID); ItemInfo _Procedure = ItemInfo.Get(_ItemID);
// C2026-053 Open procedure tab but only if it's NOT a Word section // C2026-053 Open procedure tab but only if it's NOT a Word section
// Needed to disable opening saved Word sections - at least for now. // Needed to disable opening saved Word sections - at least for now.
@@ -2439,18 +2440,29 @@ namespace VEPROMS
// SelectedStepTabPanel needs to be set so the print buttons on the ribbon will work. // SelectedStepTabPanel needs to be set so the print buttons on the ribbon will work.
SelectedStepTabPanel = tc.MyEditItem.MyStepPanel.MyStepTabPanel; SelectedStepTabPanel = tc.MyEditItem.MyStepPanel.MyStepTabPanel;
//CSM B2024-090 - if last displaytab item, LastEditItem = tc.MyEditItem; //set last tab index
//select the steptab panel for it if ((DisPlayTabState.Rows.IndexOf(TabState) == DisPlayTabState.Rows.Count - 1))
//and set the EditItem for Find/Replace
//otherwise will cause PROMS to crash if Find clicked before a Tab is given Focus
if ((DisPlayTabState.Rows.IndexOf(TabState) == DisPlayTabState.Rows.Count - 1))
{ {
SelectedStepTabPanel.Select(); SelectedStepTabPanel.Select();
dlgFindReplace.MyEditItem = tc.MyEditItem; }
SpellChecker.MyEditItem = tc.MyEditItem; //B2025-043 Remember Tabs is not setting the EditItem for the active window causing a PROMS crash when Spell Check }
} //CSM B2024-090 - if last displaytab item,
} //select the steptab panel for it
tc.LoadingSavedProcTabs = false; //and set the EditItem for Find/Replace
//otherwise will cause PROMS to crash if Find clicked before a Tab is given Focus
if (LastEditItem != null)
{
dlgFindReplace.MyEditItem = LastEditItem;
SpellChecker.MyEditItem = LastEditItem; //B2025-043 Remember Tabs is not setting the EditItem for the active window causing a PROMS crash when Spell Check
//B2026-090 Populate Step Properties Panel when PROMS restores saved display tabs
LastEditItem.MyStepPanel.BringToFront();
LastEditItem.MyStepPanel.Select();
Application.DoEvents();
tc_ItemSelectedChanged(this, new ItemSelectedChangedEventArgs(tc.MyEditItem));
}
tc.LoadingSavedProcTabs = false;
} }
} }
} }
@@ -3192,7 +3192,7 @@ namespace Volian.Controls.Library
{ {
int itemID = int.Parse(nd.Attributes.GetNamedItem("id").InnerText); int itemID = int.Parse(nd.Attributes.GetNamedItem("id").InnerText);
ItemInfo ii = ItemInfo.Get(itemID); ItemInfo ii = ItemInfo.Get(itemID);
if (ii.SearchAnnotationText == null && ii.ItemAnnotations != null) ii.SearchAnnotationText = AnnotationInfo.Get(ii.ItemAnnotations[0].AnnotationID).SearchText; if (ii.SearchAnnotationText == null && ii.ItemAnnotations != null && ii.ItemAnnotations.Count > 0) ii.SearchAnnotationText = AnnotationInfo.Get(ii.ItemAnnotations[0].AnnotationID).SearchText;
SearchResults.AddItemInfo(ii); SearchResults.AddItemInfo(ii);
} }
lbSrchResults.DataSource = SearchResults; lbSrchResults.DataSource = SearchResults;
@@ -3214,7 +3214,7 @@ namespace Volian.Controls.Library
int itemID = int.Parse(nd.Attributes.GetNamedItem("id").InnerText); int itemID = int.Parse(nd.Attributes.GetNamedItem("id").InnerText);
ItemInfo ii = ItemInfo.Get(itemID); ItemInfo ii = ItemInfo.Get(itemID);
// B2020-107: The following was needed to set the Step Path result type for annotations // B2020-107: The following was needed to set the Step Path result type for annotations
if (ii.SearchAnnotationText == null && ii.ItemAnnotations != null) if (ii.SearchAnnotationText == null && ii.ItemAnnotations != null && ii.ItemAnnotations.Count > 0)
{ {
ii.SearchAnnotationText = AnnotationInfo.Get(ii.ItemAnnotations[0].AnnotationID).SearchText; ii.SearchAnnotationText = AnnotationInfo.Get(ii.ItemAnnotations[0].AnnotationID).SearchText;
ii.SearchAnnotationID = ii.ItemAnnotations[0].AnnotationID; ii.SearchAnnotationID = ii.ItemAnnotations[0].AnnotationID;
@@ -3245,7 +3245,7 @@ namespace Volian.Controls.Library
{ {
int itemID = int.Parse(nd.Attributes.GetNamedItem("id").InnerText); int itemID = int.Parse(nd.Attributes.GetNamedItem("id").InnerText);
ItemInfo ii = ItemInfo.Get(itemID); ItemInfo ii = ItemInfo.Get(itemID);
if (ii.SearchAnnotationText == null && ii.ItemAnnotations != null) ii.SearchAnnotationText = AnnotationInfo.Get(ii.ItemAnnotations[0].AnnotationID).SearchText; if (ii.SearchAnnotationText == null && ii.ItemAnnotations != null && ii.ItemAnnotations.Count > 0) ii.SearchAnnotationText = AnnotationInfo.Get(ii.ItemAnnotations[0].AnnotationID).SearchText;
SearchResults.AddItemInfo(ii); SearchResults.AddItemInfo(ii);
} }
lbSrchResultsIncTrans.DataSource = SearchResults; lbSrchResultsIncTrans.DataSource = SearchResults;
+17 -3
View File
@@ -3512,10 +3512,24 @@ namespace Volian.Controls.Library
} }
break; break;
case "InsRNO": case "InsRNO":
displayMenu = ((actable & E_AccStep.AddingRNO) > 0) && btnCMInsRNO.Enabled; //B2026-086 Have Shortcut Keys for adding a RNO auto-work instead of having to press a button after shortcut key
displayMenu = false;
LetUserKnowIfTheyCannotAdd(actable, E_AccStep.AddingRNO,"RNO"); // B2018-014 Inform user that they cannot add the specified step type LetUserKnowIfTheyCannotAdd(actable, E_AccStep.AddingRNO,"RNO"); // B2018-014 Inform user that they cannot add the specified step type
_ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMInsRNO);
break; if (((actable & E_AccStep.AddingRNO) > 0) && btnCMInsRNO.Enabled)
{
try
{
btnCMInsRNO.SubItems["cmbtnRNOType"].RaiseClick();
}
catch
{
_ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMInsRNO);
displayMenu = true;
}
}
break;
case "InsSubStps": case "InsSubStps":
displayMenu = ((actable & E_AccStep.AddingSub) > 0) && btnCMInsSubStps.Enabled; displayMenu = ((actable & E_AccStep.AddingSub) > 0) && btnCMInsSubStps.Enabled;
LetUserKnowIfTheyCannotAdd(actable, E_AccStep.AddingSub,"Sub-step"); // B2018-014 Inform user that they cannot add the specified step type LetUserKnowIfTheyCannotAdd(actable, E_AccStep.AddingSub,"Sub-step"); // B2018-014 Inform user that they cannot add the specified step type