Focus Mode | Make Ctrl+S shortcut contextual to Prefab Focus (#7649)

* Change the Ctrl+S flow to save the currently focused prefab instead of the root.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Ensure the Outliner is refreshed on save

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Rename ExecuteClosePrefabDialog to be more accurate (the function also does the saving, it's not just creating the dialog).

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Minor changes to labeling.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Adjust labeling to reflect changes in behavior.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Revert labeling changes

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Additional checks to guarantee the system works in test mode

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Additional check to prevent crashes when the editor somehow triggers save during automated tests.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Simplify checks

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Update preferences and dialog labels to reflect new behavior.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
This commit is contained in:
Danilo Aimini
2022-02-17 15:26:10 -08:00
committed by GitHub
parent 322a6c495a
commit 6fe2664b68
10 changed files with 54 additions and 25 deletions
+1 -1
View File
@@ -667,7 +667,7 @@ bool CCryEditDoc::SaveModified()
return true;
}
int prefabSaveSelection = m_prefabIntegrationInterface->ExecuteClosePrefabDialog(rootPrefabTemplateId);
int prefabSaveSelection = m_prefabIntegrationInterface->HandleRootPrefabClosure(rootPrefabTemplateId);
// In order to get the accept and reject codes of QDialog and QDialogButtonBox aligned, we do (1-prefabSaveSelection) here.
// For example, QDialog::Rejected(0) is emitted when dialog is closed. But the int value corresponds to