dmnfarrell / pandastable

Table analysis in Tkinter using pandas DataFrames.
Other
631 stars 126 forks source link

handle_left_release(event) in Table only checks if column is categorical but not editable. #248

Closed JoseDataScience closed 9 months ago

JoseDataScience commented 10 months ago

I don't believe this is the intended behavior.

Instead of only having:

if dtype.name == 'category':

I believe it should be:

if self.editable and dtype.name == 'category':

As it stands you can make edits to categorical columns even when the table itself isn't editable. This is not an issue when double clicking to edit non-categorical columns (which is analogous behavior). In handle_double_click() there is a call to drawCellEntry() which does check for self.editable and prevents editing.

Should be a quick fix if this behavior isn't intended.

dmnfarrell commented 9 months ago

should be fixed now.