Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EMSUSD-255 Fixes an issue in Layer Editor where Save All icon was not functioning properly. #3222

Merged

Conversation

AramAzhari-adsk
Copy link
Collaborator

EMSUSD-255 Fixes an issue in Layer Editor where Save All icon was not functioning properly.

The issue occurred due to Qt UI layout changes. The solution is to keep track of the SaveLayerPathRow data separately so that it can be iterated over when saving all layers.

@AramAzhari-adsk AramAzhari-adsk added bug Something isn't working adsk Related to Autodesk plugin labels Jul 12, 2023
QLayout* anonLayout = _anonLayersWidget->layout();
for (int i = 0, count = anonLayout->count(); i < count; ++i) {
auto row = dynamic_cast<SaveLayerPathRow*>(anonLayout->itemAt(i)->widget());
for (int i = 0, count = _saveLayerPathRows.size(); i < count; ++i) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept the order of iteration the same as before, Although in this case it shouldn't matter as it is only picking one item.

QLayout* anonLayout = _anonLayersWidget->layout();
for (int i = 0, count = anonLayout->count(); i < count; ++i) {
func(anonLayout->itemAt(i)->widget());
for (int i = 0, count = _saveLayerPathRows.size(); i < count; ++i) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, the order of iteration is from top layer to bottom

Copy link
Collaborator

@pierrebai-adsk pierrebai-adsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AramAzhari-adsk AramAzhari-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Jul 17, 2023
@seando-adsk seando-adsk merged commit 3e1f262 into dev Jul 18, 2023
@seando-adsk seando-adsk deleted the azharia/EMSUSD-255/Fixes-LayerEditor-SaveAll-Functionality branch July 18, 2023 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adsk Related to Autodesk plugin bug Something isn't working ready-for-merge Development process is finished, PR is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants