Compare commits

..

2 Commits

9 changed files with 12 additions and 29 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -22230,11 +22230,9 @@ Go
/*
==========================================================================================================
Begin: C2024-004 | B2024-041: KL - Update Copy Replace functionality, (remove ''copy of'')
==========================================================================================================
*/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[ReplaceItemAndChildren]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[ReplaceItemAndChildren]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
@@ -23247,11 +23245,9 @@ BEGIN CATCH -- Catch Block
END CATCH END CATCH
Go Go
/*
==========================================================================================================
End: C2024-004: KL - Update Copy Replace functionality, (remove ''copy of'')
==========================================================================================================
*/
@@ -23289,8 +23285,8 @@ BEGIN TRY -- Try Block
DECLARE @RevDate varchar(255) DECLARE @RevDate varchar(255)
DECLARE @RevDescription varchar(255) DECLARE @RevDescription varchar(255)
set @RevDate = '07/16/2024 4:19 AM' set @RevDate = '07/16/2024 3:37 PM'
set @RevDescription = 'B2024-041: Bug fix for copy/replace functionality on procedures and steps' set @RevDescription = 'B2024-041: Updates to allow for proper replace vs paste above or below'
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription

View File

@@ -669,7 +669,7 @@ namespace Volian.Controls.Library
ItemInfo proc = myItemInfo.MyProcedure; // Find procedure Item ItemInfo proc = myItemInfo.MyProcedure; // Find procedure Item
string key = "Item - " + proc.ItemID.ToString(); string key = "Item - " + proc.ItemID.ToString();
if (_MyDisplayTabItems.ContainsKey(key) && pasteType != ItemInfo.EAddpingPart.Replace) // If procedure page open use it unless replace if (_MyDisplayTabItems.ContainsKey(key)) // If procedure page open use it
{ {
DisplayTabItem pg = _MyDisplayTabItems[key]; DisplayTabItem pg = _MyDisplayTabItems[key];
if (pg.MyStepTabPanel.MyStepPanel._LookupEditItems.ContainsKey(myItemInfo.ItemID) && if (pg.MyStepTabPanel.MyStepPanel._LookupEditItems.ContainsKey(myItemInfo.ItemID) &&
@@ -708,11 +708,6 @@ namespace Volian.Controls.Library
return true; return true;
} }
} }
else if (_MyDisplayTabItems.ContainsKey(key) && pasteType == ItemInfo.EAddpingPart.Replace)
{
CloseTabItem(_MyDisplayTabItems["Item - " + myItemInfo.ItemID.ToString()]); //Grab itemID and set to close open tab.
return false; //B2017-179 PasteReplace will return null if was aborted
}
return false; return false;
} }

View File

@@ -1825,16 +1825,8 @@ namespace Volian.Controls.Library
EditItem newFocus = null; EditItem newFocus = null;
EditItem nextEditItem = MyNextEditItem; EditItem nextEditItem = MyNextEditItem;
EditItem prevEditItem = MyPreviousEditItem; EditItem prevEditItem = MyPreviousEditItem;
EditItem parentEditItem = null; // ActiveParent; if (MyStepPanel?.SelectedEditItem?.ActiveParent == null) return null; //Was causing an error when active parent was null and the replaced proc was opened in the editor.
try EditItem parentEditItem = ActiveParent;
{
parentEditItem = ActiveParent ?? MyStepPanel?.SelectedEditItem?.ActiveParent;
}
catch (NullReferenceException)
{
// KL 7/11/2024 - Handle the case where ActiveParent throws a Null Reference Exception
parentEditItem = MyStepPanel?.SelectedEditItem?.ActiveParent;
}
StepConfig savOrigPasteConfig = MyItemInfo.MyConfig as StepConfig; StepConfig savOrigPasteConfig = MyItemInfo.MyConfig as StepConfig;
int TopMostYBefore = TopMostEditItem.Top; int TopMostYBefore = TopMostEditItem.Top;