Skip to content

ExportDialog Drawn Off Screen #2367

@cdfredrick

Description

@cdfredrick

Depending on the size of the scene the export dialog box can be drawn off or partially off screen. This is due to an implementation of the show command that allows moving the box to negative pixel indices.

Problem Code:

if not self.shown:
self.shown = True
vcenter = self.scene.getViewWidget().geometry().center()
self.setGeometry(int(vcenter.x() - self.width() / 2),
int(vcenter.y() - self.height() / 2),
self.width(), self.height())

To fix this, the position calculation can be clipped using max, and the setGeometry command can be changed to move to account for the size of the window's frame.

Potential Fix:

        if not self.shown:
            self.shown = True
            vcenter = self.scene.getViewWidget().geometry().center()
            x = max(0, int(vcenter.x() - self.width() / 2))
            y = max(0, int(vcenter.y() - self.height() / 2))
            self.move(x, y)

I can't say I understand the motivation for moving the dialog box in the first place, but atleast with this modification the dialog box is always accessible with the mouse.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions