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

Elements disappear. Only the first of type is seen. #359

Closed
2 of 7 tasks
dlagg opened this issue Jul 11, 2020 · 8 comments
Closed
2 of 7 tasks

Elements disappear. Only the first of type is seen. #359

dlagg opened this issue Jul 11, 2020 · 8 comments
Labels
bug An issue in the application

Comments

@dlagg
Copy link

dlagg commented Jul 11, 2020

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request

Current behavior

Drawing certain elements like Class or some kind of arrows (like dependency). The element disappear and you only see the 1º element of this type created. (first class, arrow), by clicking it you see all.
By moving the elements disappear again.

Expected behavior

See all the elements in at all times.

Minimal reproduction of the problem with instructions

Create 2 or more class element or different types of arrows.

System Information

OS:

  • Linux (Please put in notes the specific distro)
  • MacOS
  • Windows 10
  • Windows 7

NOTES:
5.7.7-arch1-1 (arcolinux with i3wm)

@amolenaar
Copy link
Member

Hi,

Thanks for reporting this issue.

This sounds like a strange issue. It sounds like something is not rendering okay. Can you provide a little more detail? A screenshot or little screen recording maybe?

Do you have logging of Gaphor maybe? It may be that there are some exceptions raised in the application that are not directly visible to the user.

@danyeaw danyeaw added the bug An issue in the application label Jul 19, 2020
@danyeaw
Copy link
Member

danyeaw commented Jul 19, 2020

@dlagg Thanks for submitting this issue. I was able to install Arch in a VM and I get this same error using the AUR package.
My configuration was the latest Arch, X11, and LXDE wm. I also installed it from source using released version 1.2.0, and I didn't get the error. So it is seems like it may be related to the AUR packaging. Below is the traceback:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/gaphas/decorators.py", line 137, in async_wrapper
    func(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/gaphas/view.py", line 796, in update_back_buffer
    self.painter.paint(Context(cairo=cr, items=items))
  File "/usr/lib/python3.8/site-packages/gaphas/painter.py", line 74, in paint
    painter.paint(context)
  File "/usr/lib/python3.8/site-packages/gaphas/painter.py", line 139, in paint
    self.draw_items(context.items, cairo)
  File "/usr/lib/python3.8/site-packages/gaphas/painter.py", line 116, in draw_items
    self.draw_item(item, cairo)
  File "/usr/lib/python3.8/site-packages/gaphas/painter.py", line 96, in draw_item
    item.draw(
  File "/usr/lib/python3.8/site-packages/gaphor/diagram/presentation.py", line 112, in draw
    self._shape.draw(context, Rectangle(0, 0, self.width, self.height))
  File "/usr/lib/python3.8/site-packages/gaphor/diagram/shapes.py", line 181, in draw
    c.draw(context, Rectangle(x, y, w, h))
  File "/usr/lib/python3.8/site-packages/gaphor/diagram/shapes.py", line 181, in draw
    c.draw(context, Rectangle(x, y, w, h))
  File "/usr/lib/python3.8/site-packages/gaphor/diagram/shapes.py", line 323, in draw
    text_draw_focus_box(context, x, y, w, h)
  File "/usr/lib/python3.8/site-packages/gaphor/diagram/text.py", line 49, in text_draw_focus_box
    if context.hovered or context.focused or context.draw_all:
AttributeError: 'DrawContext' object has no attribute 'draw_all'

@danyeaw
Copy link
Member

danyeaw commented Jul 19, 2020

@all-contributors please add @dlagg for bug

@allcontributors
Copy link
Contributor

@danyeaw

I've put up a pull request to add @dlagg! 🎉

@danyeaw
Copy link
Member

danyeaw commented Jul 19, 2020

I did more testing, and this issue is also reproducible in Arch by running pip install gaphor in a new virtualenv. The AUR is installing Gaphor using the wheel on PyPI directly.

@danyeaw
Copy link
Member

danyeaw commented Jul 20, 2020

This issue isn't specific to Arch, I think Gaphor is currently broken for pip install installations for all operating systems. In gaphor/gaphas#73 we removed the draw_all property from the draw method, which version 1.2.0 of Gaphor depends on. I think we have a few options to resolve this:

  1. Release Gaphor 1.2.1 and either remove the dependency on draw_all, or change the Gaphas version to be ~2.0.0
  2. Revert the change in Gaphas and release version 2.1.2, release version 3.0.0 of Gaphas with the change if needed

@amolenaar Do you have a preference?

@danyeaw
Copy link
Member

danyeaw commented Jul 23, 2020

@dlagg Thanks once again for submitting this issue. Gaphas 2.1.2 is now released and this issue is resolved.

@actionless Could you please help ensure a new Arch PKGBUILD gets released for new Gaphas version? Thanks!

@danyeaw danyeaw closed this as completed Jul 23, 2020
@actionless
Copy link
Contributor

updated PKGBUILDs for both release and git versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue in the application
Projects
None yet
Development

No branches or pull requests

4 participants