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

+ New feauture from wishlist: drag'n'drop pictures from web browser\n* F... #80

Merged
merged 2 commits into from
Jul 19, 2020

Conversation

maxskorr
Copy link
Contributor

...ixed: OpenImagesListWidget caused NullPointerException when clicked fast more than once

…* Fixed: OpenImagesListWidget caused NullPointerException when clicked fast more than one times.
@maxskorr
Copy link
Contributor Author

System.Net.WebClient client = new System.Net.WebClient ();
string tempFilePath = System.IO.Path.GetTempPath () + System.IO.Path.GetFileName(file);

Console.WriteLine (">>File downloaded; " + file + "; " + tempFilePath);
Copy link
Member

Choose a reason for hiding this comment

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

I think the error handling and progress notifications need to be improved here (e.g. showing dialogs instead of dumping messages to the console).

if (file.StartsWith ("file://"))
PintaCore.Workspace.OpenFile (new Uri (file).LocalPath);
try {
PintaCore.Workspace.HasOpenPendingDocuments = true;
Copy link
Member

Choose a reason for hiding this comment

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

I'm not clear why HasOpenPendingDocuments is necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As far as I remember not setting this flag up could lead to something like NullPointerException or so in case of user trying to open more than one document at the same time.

Copy link
Member

Choose a reason for hiding this comment

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

IMO it should be removed - the only place it's checked is inside WindowPointToCanvas, but mouse events shouldn't be handled while an image is being downloaded. The progress dialog should be a modal dialog, while the image is downloaded in the background.

@darkdragon-001
Copy link
Contributor

Any news here?

cameronwhite added a commit that referenced this pull request Jul 19, 2020
- Remove the HasPendingOpenDocuments member, which shouldn't be necessary.
- Make the strings translatable.
- Ensure that the new image isn't marked as being associated with a file, so that the user can't save to the temp file and later lose their work.

#80
@cameronwhite cameronwhite merged commit 0f53747 into PintaProject:master Jul 19, 2020
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.

None yet

3 participants