Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bbaea7ab67 | ||
|
|
dc22ff6e3b |
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user