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

Tuples can be "edited" in Variable Explorer but changes are discarded #5953

Closed
CAM-Gerlach opened this issue Dec 10, 2017 · 6 comments
Closed

Comments

@CAM-Gerlach
Copy link
Member

CAM-Gerlach commented Dec 10, 2017

Description

In the Variable Explorer, if one opens a tuple and double clicks on one of the elements to edit, the field becomes editable and the user can enter, modify or delete text. However, upon hitting return/okay, the changes are (of course, as they should be) discarded. It would seem for consistency with tuples' immutability and to minimize new user confusion about their changes not being saved, that it would be best to make the field selectable (e.g. can select text like a text box as you can currently) but not editable. I presume there's a way to do that by selecting a different type or parameter for the Qt text field object?

What steps will reproduce the problem?

  1. Create any tuple, e.g.
tup = ("foo", "bar", 42)
  1. Open in variable explorer and double click an element value
  2. Edit field contents then click off/enter

What is the expected output? What do you see instead?
Expected: When double clicked, text becomes selectable as if it were a text field, but cannot be changed/edited.
Actual: Field can be edited like any other text box, but changes of course discarded when clicked off of/"accepted"

Version and main components

  • Spyder Version: 3.2.4
  • Python Version: 3.6.3
  • Qt Versions: 5.6.2, PyQt5 5.6 on Windows

Dependencies

IPython >=4.0    :  6.1.0 (OK)
cython >=0.21    :  0.26.1 (OK)
jedi >=0.9.0     :  0.10.2 (OK)
nbconvert >=4.0  :  5.3.1 (OK)
numpy >=1.7      :  1.13.3 (OK)
pandas >=0.13.1  :  0.20.3 (OK)
pycodestyle >=2.3:  2.3.1 (OK)
pyflakes >=0.6.0 :  1.6.0 (OK)
pygments >=2.0   :  2.2.0 (OK)
pylint >=0.25    :  1.7.4 (OK)
qtconsole >=4.2.0:  4.3.1 (OK)
rope >=0.9.4     :  0.10.5 (OK)
sphinx >=0.6.6   :  1.6.3 (OK)
sympy >=0.7.3    :  1.1.1 (OK)

@CAM-Gerlach CAM-Gerlach changed the title UI: Tuples can be "edited" in Variable Explorer but changes discarded UI: Tuples can be "edited" in Variable Explorer (but changes discarded, of course) Dec 10, 2017
@ccordoba12 ccordoba12 added this to the v3.2.x milestone Dec 10, 2017
@CAM-Gerlach CAM-Gerlach changed the title UI: Tuples can be "edited" in Variable Explorer (but changes discarded, of course) UI: Tuples can be "edited" in Variable Explorer (but changes are discarded, of course) Dec 10, 2017
@ccordoba12
Copy link
Member

@CAM-Gerlach, do you want to take a look at this one? It should be an easy fix.

@ccordoba12 ccordoba12 changed the title UI: Tuples can be "edited" in Variable Explorer (but changes are discarded, of course) Tuples can be "edited" in Variable Explorer but changes are discarded Dec 10, 2017
@CAM-Gerlach
Copy link
Member Author

@ccordoba12 Giggles nervously Sure, I can give it a look sometime over the next few days, if you think its easy enough (I'm visiting my family at the moment so it might not be right away). Should I base it against 3.x or master? Not sure if it would count as an enhancement or bug fix.

@ccordoba12
Copy link
Member

ccordoba12 commented Dec 10, 2017

Should I base it against 3.x or master?

3.x. You can tell what branch you need to use by looking at the Milestone tag on the right. If it starts with 3.2 is for 3.x , else it's for master

@CAM-Gerlach
Copy link
Member Author

CAM-Gerlach commented Dec 11, 2017

Well I'm a silly goose, haha—I usually notice when a version tag is added, but somehow missed it this time. Thanks.

@Prikers
Copy link
Contributor

Prikers commented Dec 11, 2017

@CAM-Gerlach you will probably want to have a look at the collectioneditor file and more specifically to the BaseTableView and CollectionsEditorTableView classes (I think). Do not hesitate to ask if you need guidance.

@CAM-Gerlach
Copy link
Member Author

CAM-Gerlach commented Dec 12, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants