static void DoProcessMergesButton( bool isEnabled, string processMergesButtonText, IncomingChangesViewLogic incomingChangesViewLogic, IncomingChangesTreeView incomingChangesTreeView) { GUI.enabled = isEnabled; if (GUILayout.Button(processMergesButtonText, EditorStyles.toolbarButton)) { List <IncomingChangeInfo> incomingChanges = incomingChangesViewLogic.GetCheckedChanges(); incomingChangesTreeView.FillWithMeta(incomingChanges); if (incomingChanges.Count == 0) { return; } incomingChangesViewLogic.ProcessMergesForItems( incomingChanges, Refresh.UnityAssetDatabase); } GUI.enabled = true; }
static void DoProcessMergesButton( bool isEnabled, string processMergesButtonText, IncomingChangesViewLogic incomingChangesViewLogic, IncomingChangesTreeView incomingChangesTreeView, Action afterProcessMergesAction) { GUI.enabled = isEnabled; if (DrawActionButton.For(processMergesButtonText)) { List <IncomingChangeInfo> incomingChanges = incomingChangesViewLogic.GetCheckedChanges(); incomingChangesTreeView.FillWithMeta(incomingChanges); if (incomingChanges.Count == 0) { return; } incomingChangesViewLogic.ProcessMergesForItems( incomingChanges, afterProcessMergesAction); } GUI.enabled = true; }