Command check file save before open#7061
Merged
mjkkirschner merged 3 commits intoDynamoDS:masterfrom Aug 21, 2016
Merged
Conversation
add test add test to proj
add viewModel test
| NodeFromSelectionCommand = new DelegateCommand(CreateNodeFromSelection, CanCreateNodeFromSelection); | ||
| } | ||
|
|
||
| public DelegateCommand OpenIfSavedCommand { get; set; } |
Collaborator
There was a problem hiding this comment.
Is this attached to XAML?
Collaborator
|
LGTM. |
Member
Author
|
I'm going to merge this in - @BogdanZavu please test this API and let us know if it does what you need. |
Contributor
|
Thank you @mjkkirschner , @ramramps . I'll test it tomorrow and let you know. |
6 tasks
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-10495
1 - This PR adds another command to the
DynamoViewModel-OpenIfSavedcommand which wraps aDynamoModelOpenFileCommandwith a check for unsaved changes on the home workspace. If there are unsaved changes the message box requesting a save is popped up.2 - This task also requested exploring a property exposing the modal state of the Dynamo UI - I.E, are there any windows open that would disallow interactions with the
DynamoModel.the best I have found is the static class
ComponentDispatcher.EnterThreadModalevent which would allow us to set a bool flag somewhere on the view or view model. Unfortunately message boxes(without owners) do not fire this event so a scan over all message box and other popup / window code would need to be done and consequences of this would need to be tested.I would guess this handler would be set at view model or view construction time. Looking for thoughts and feedback on this, note this PR does not include this handler.
For now, I will leave this property as a followup task if deemed necessary
Declarations
Check these if you believe they are true
*.resxfilesReviewers
@ramramps
@sharadkjaiswal
FYIs
@kronz @BogdanZavu