Skip to content

BF: coder GUI fixes#6678

Merged
TEParsons merged 2 commits intopsychopy:devfrom
aforren1:bf-gui
Jul 8, 2024
Merged

BF: coder GUI fixes#6678
TEParsons merged 2 commits intopsychopy:devfrom
aforren1:bf-gui

Conversation

@aforren1
Copy link
Copy Markdown
Contributor

@aforren1 aforren1 commented Jul 8, 2024

Two things I noticed while using coder on Linux:

  1. Right-clicking in the coder view led to this assertion:

Traceback (most recent call last):
File "/home/testdev/py/psychopy/psychopy/app/coder/codeEditorBase.py", line 110, in OnContextMenu
undoItem.Enable(self.CanUndo())
wx._core.wxAssertionError: C++ assertion ""m_menuItem"" failed at /home/wxpy/wxPython-4.2.1/ext/wxWidgets/src/gtk/menu.cpp(803) in Enable(): invalid menu item

and flipping the enable/append order seems to resolve it.

  1. The "find" dialog couldn't be exited by clicking the (x) button, only by cancel/esc key. Explicitly destroying the dialog seems to resolve it.

Tested on Ubuntu 20.04, and doesn't seem to adversely affect behavior on Windows.

aforren1 added 2 commits July 8, 2024 10:25
The dialog doesn't seem to be destroyed unless .Destroy()
is explicitly called. This fixes behavior on Mac/Linux; Windows
seemed to behave as expected prior to this change.
Other platforms don't seem sensitive to the order, but the original
order leads to an assertion on the wx side.
@TEParsons TEParsons merged commit 5c3462f into psychopy:dev Jul 8, 2024
@peircej peircej added the 🐞 bug Issue describes a bug (crash or error) or undefined behavior. label Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Issue describes a bug (crash or error) or undefined behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants