-
Notifications
You must be signed in to change notification settings - Fork 78
BUG: stop designer from setting line-edits in ui file to be readOnly when PYDM_DESIGNER_ONLINE enabled #1253
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
base: master
Are you sure you want to change the base?
Conversation
2426824
to
6130c4d
Compare
6130c4d
to
d8685fd
Compare
…when PYDM_DESIGNER_ONLINE enabled when editing a lineedit widget in designer after doing 'export PYDM_DESIGNER_ONLINE=1', we want widgets to act as read-only so PVs are not accidentally changed when modifying screens. this is enforced by the dataplugins themselves and is_read_only() (set during designer setup: https://github.com/slaclab/pydm/blob/master/pydm/qtdesigner.py#L47) but we don't want the readOnly=true status to be saved into the ui file containing the lineedit. to avoid this, don't let lineedit set itself to readOnly if it's loaded in designer with live data enabled. (it will still act in a read-only way thanks to dataplugins themselves)
d8685fd
to
9572ecf
Compare
Irrespective of my suggestions/notes above, I'll run this myself and verify that I see better behavior |
I'm going to stop trying to test this because I want you to test it first |
ok sry for that! did do testing b4 but seems i didnt upload my latest local changes |
ok tested latest changes as follows: -create a ui file with -open text-editor and manually reset |
This does fix the bug! But it introduces the opposite problem, in that Is a read-only |
ok yes i see the issue. as for why you would want a readonly lineedit (as opposed to say a label just displaying the value), the justification from the qt docs for the setting is: `In read-only mode, the user can still copy the text to the clipboard...' |
btw here's the original pr for some justification: #939 also this same issue seems to happen with the |
actually seems like this effects all widgets b/c of code in base.py , inserting enabled=False into the ui files after editing unrelated property in designer but turns out it doesn't end up actually disabling other widgets at non-designer runtime, despite the ui file changes. |
when editing a lineedit widget in designer after doing 'export PYDM_DESIGNER_ONLINE=1',
we want widgets to act as read-only so PVs are not accidentally changed
when modifying screens. this is enforced by the dataplugins themselves
and is_read_only() (set during designer setup: https://github.com/slaclab/pydm/blob/master/pydm/qtdesigner.py#L47)
but we don't want the readOnly=true status to be saved into the
ui file containing the lineedit.
to avoid this, don't let lineedit set itself to readOnly if it's
loaded in designer with live data enabled. (it will still act in a
read-only way thanks to dataplugins themselves)