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

Scripting: Fixed behavior of Dialog.SameWidgetRows #3638

Merged
merged 1 commit into from
Mar 29, 2023

Conversation

bjorn
Copy link
Member

@bjorn bjorn commented Mar 29, 2023

When a new row was created automatically when adding a widget, it was failing to remember the type of that widget, since addNewRow was called after setting m_lastWidgetTypeName.

Now the last widget type is set in addDialogWidget instead. Also, we no longer compare the type names but just compare the QMetaObject pointers directly.

Also fixed a problem in ScriptDialog::deleteAllDialogs, which iterated the sDialogInstances container while it was also getting modified as each dialog was deleted.

Closes #3607

When a new row was created automatically when adding a widget, it was
failing to remember the type of that widget, since addNewRow was called
after setting m_lastWidgetTypeName.

Now the last widget type is set in addDialogWidget instead. Also, we no
longer compare the type names but just compare the QMetaObject pointers
directly.

Also fixed a problem in ScriptDialog::deleteAllDialogs, which iterated
the sDialogInstances container while it was also getting modified as
each dialog was deleted.

Closes mapeditor#3607
@bjorn bjorn merged commit cdef7e6 into mapeditor:master Mar 29, 2023
@bjorn bjorn deleted the fix-dialog-samewidgetrows branch March 29, 2023 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scripting: Dialog.SameWidgetRows not working as expected
1 participant