Skip to content

Conversation

@StephenNneji
Copy link
Contributor

This will stop these dialogs from getting lost behind other windows or on a second screen

@StephenNneji StephenNneji force-pushed the tweak_modal_dialog branch 2 times, most recently from 48b3fd1 to 77dd347 Compare January 31, 2025 11:21
Copy link
Member

@RabiyaF RabiyaF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR looks good 👍🏼 I tested it on Mac and the updated changes provide a much better UX. I tested both the widgets. Everything looks good. There is one small comment.

self.new_project_action.triggered.connect(lambda: self.presenter.confirmSave(self.showNewProjectWidget))

self.open_project_action = QtGui.QAction('&Open Project', self)
self.open_project_action.setStatusTip('Open an existing project')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see an error originating from line 158 if a certain sequence is followed. Can you verify if it happens on Windows too.

  1. Open SScanSS-2 app.

  2. Click X on the ProjectWidget.
    image

  3. Click the open project button.
    image

  4. Do not select anything. Just press cancel.

  5. I see this Traceback on Mac
    image

I updated openProject as follows to get rid of the error on mac but there might be a better way to do it. Maybe the Open Project icon can be disabled till either a new project is created or an existing project is selected from the ProjectWidget.
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, the bug was caused by this line

self.open_project_action.triggered.connect(lambda: self.presenter.confirmSave(self.presenter.openProject()))

which should be

self.open_project_action.triggered.connect(lambda: self.presenter.confirmSave(self.presenter.openProject))

Should be fixed now

Copy link
Member

@RabiyaF RabiyaF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it on Mac with the latest changes and everything is working as expected.

@StephenNneji StephenNneji merged commit 9de9068 into master Mar 6, 2025
3 checks passed
@StephenNneji StephenNneji deleted the tweak_modal_dialog branch September 3, 2025 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants