-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: Dialog.SameWidgetRows
not working as expected
#3607
Labels
bug
Broken behavior.
Comments
bjorn
added a commit
to bjorn/tiled-dev
that referenced
this issue
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 mapeditor#3607
Thanks for the nice reproducible example script! Should be fixed now in linked PR. :-) |
Thanks! I had a go at the new build and removing manual addNewRow() calls from my various Dialogs, and now it looks like only Labels "break" the same widget row rule, just like they're supposed to. Looks like this is fixed. |
bjorn
added a commit
that referenced
this issue
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When adding various widgets to a Dialog with row mode
Dialog.SameWidgetRows
(the default), new rows aren't always created when they should be.It seems that the type of the previous widget is only checked (to potentially add a new row) for the 2nd widget onwards, the first widget in each row will not cause a break no matter what's added after it.
For example, if I make a Dialog like this:
I expect a Dialog that looks like this:
But what I actually get is this:
I observed this behaviour in 1.9.1 (Qt5) and in a 2023.03.07 nightly (Qt6), on Windows 10.
The text was updated successfully, but these errors were encountered: