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

Crash when attempting to view folder as text #998

Closed
amconners opened this issue Jan 16, 2022 · 1 comment · Fixed by #999
Closed

Crash when attempting to view folder as text #998

amconners opened this issue Jan 16, 2022 · 1 comment · Fixed by #999
Milestone

Comments

@amconners
Copy link
Contributor

While in the editor with a folder selected in the project tree, clicking the Text button at the bottom of the screen causes the program to crash:

CRITICAL> An unhandled exception has occurred!
Traceback (most recent call last):
  File "/usr/share/manuskript/manuskript/ui/editors/mainEditor.py", line 83, in <lambda>
    lambda v: self.setFolderView("text"), AUC)
  File "/usr/share/manuskript/manuskript/ui/editors/mainEditor.py", line 369, in setFolderView
    self.currentEditor().setFolderView(view)
  File "/usr/share/manuskript/manuskript/ui/editors/editorWidget.py", line 108, in setFolderView
    self.setCurrentModelIndex(self.currentIndex)
  File "/usr/share/manuskript/manuskript/ui/editors/editorWidget.py", line 312, in setCurrentModelIndex
    self.setView()
  File "/usr/share/manuskript/manuskript/ui/editors/editorWidget.py", line 256, in setView
    addTitle(item)
  File "/usr/share/manuskript/manuskript/ui/editors/editorWidget.py", line 181, in addTitle
    edt = MDEditView(self, html="<h{l}>{t}</h{l}>".format(l=min(itm.level() + 1, 5), t=itm.title()),
  File "/usr/share/manuskript/manuskript/ui/views/MDEditView.py", line 30, in __init__
    textEditView.__init__(self, parent, index, html, spellcheck,
  File "/usr/share/manuskript/manuskript/ui/views/textEditView.py", line 53, in __init__
    self.setAutoResize(autoResize)
  File "/usr/share/manuskript/manuskript/ui/views/textEditView.py", line 380, in setAutoResize
    self.sizeChange()
  File "/usr/share/manuskript/manuskript/ui/views/textEditView.py", line 372, in sizeChange
    self.setMinimumHeight(docHeight)
TypeError: setMinimumHeight(self, int): argument 1 has unexpected type 'float'

As far as I can tell it's another instance of the same issue that causes #992.

Tested on the package repository version of Manuskript 0.13.1 on Arch Linux.

amconners added a commit to amconners/manuskript that referenced this issue Jan 16, 2022
amconners added a commit to amconners/manuskript that referenced this issue Jan 16, 2022
TheJackiMonster added a commit that referenced this issue Jan 16, 2022
@TheJackiMonster TheJackiMonster added this to the 0.14.0 milestone Jan 16, 2022
@TheJackiMonster TheJackiMonster linked a pull request Jan 16, 2022 that will close this issue
@TheJackiMonster
Copy link
Collaborator

The fix for this is already merged. So I will close this one.

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

Successfully merging a pull request may close this issue.

2 participants