Fix layer editor path display and optimize rebuild model#4174
Open
adubois-spin wants to merge 2 commits intoAutodesk:devfrom
Open
Fix layer editor path display and optimize rebuild model#4174adubois-spin wants to merge 2 commits intoAutodesk:devfrom
adubois-spin wants to merge 2 commits intoAutodesk:devfrom
Conversation
…et the real path whenever possible
| // to be empty for a brief time. | ||
| if (rowCount() > 0) | ||
| removeRows(0, rowCount()); | ||
| clear(); |
Collaborator
There was a problem hiding this comment.
Is this change required? Like the comments said, clear() would cause multiple notifications of changes to be sent and cause flickers. Any reason why changing it to call clear?
| // Here we choose the identifier only if the layer is anonymous | ||
| std::string layerPath{usdLayer->IsAnonymous() ? usdLayer->GetIdentifier() : | ||
| usdLayer->GetRealPath()}; | ||
| cmd += quote(layerPath); |
Collaborator
There was a problem hiding this comment.
For cases like this where the same pattern is ued multiple times, it is better to put it in a function to avoid the repetition. Maybe a function named getLayerPathForEditorCommand()
Author
There was a problem hiding this comment.
Yes I agree a function would be better.
We did not make one because we didn't know where in the package it would be best defined.
Collaborator
|
@adubois-spin Did you ever get a chance to address the code review feedback provided by Pierre? |
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.
There are two requests in this pull request: