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

Fixes image constructor with a filename as argument, solves #3947 #3949

Conversation

geoffroymontel
Copy link
Contributor

@geoffroymontel geoffroymontel commented Aug 6, 2018

Purpose and Motivation

Fixes #3947

Types of changes

Bug-fix

Checklist

  • All tests are passing
  • If necessary, new tests were created to address changes in PR (and tests are passing)
  • Updated documentation, if necessary
  • This PR is ready for review

Remaing work

I should have added a test for the Image constructor but I am not familiar enough with testing yet. I will try soon.

@nhthn nhthn added the comp: Qt GUI sclang Qt components -- for IDE tickets, use "env: SCIDE" instead label Aug 8, 2018
@nhthn nhthn added this to the 3.10 milestone Sep 20, 2018
@nhthn nhthn added the bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. label Sep 20, 2018
Copy link
Contributor

@nhthn nhthn left a comment

Choose a reason for hiding this comment

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

thanks!!! sorry for not getting to this last month, i only noticed how important this PR is now when i tried to use Image in a composition and found it wasn't working!

@@ -89,7 +89,7 @@ View : QObject {
this.background = color;
}

backgroundImage_ { arg image; this.setBackgroundImage(image) }
backgroundImage_ { arg image, tileMode=1, alpha=1.0, fromRect; this.setBackgroundImage(image, tileMode, alpha, fromRect) }
Copy link
Contributor

Choose a reason for hiding this comment

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

setter_ methods should only take a single argument.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@geoffroymontel
Copy link
Contributor Author

OK @snappizz ! I've reverted back my changes to the setter.
I will edit #3948 and #3952 accordingly

@geoffroymontel geoffroymontel changed the base branch from develop to 3.10 September 21, 2018 10:17
@geoffroymontel geoffroymontel changed the base branch from 3.10 to develop September 21, 2018 10:17
.gitignore Outdated
@@ -25,3 +25,6 @@ cmake-build-*

*~
*.orig

# VS code
.vscode
Copy link
Contributor

Choose a reason for hiding this comment

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

thanks! looks like this got committed accidentally.

after fixing, please rebase so the commit history is clean.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would not it be useful for people ? I am browsing the code with Visual Studio Code and it is adding this .vscode file at the root of the project. And I don't want to push it to the repo.
As you wish !

Copy link
Contributor

Choose a reason for hiding this comment

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

it's a perfectly okay change, but it shouldn't go in the same commit as other stuff. if you filed a PR specifically for this change, it would probably be merged quickly.

sorry to be so fussy, but a clean commit history pays off in the long run.

Copy link
Contributor

Choose a reason for hiding this comment

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

@geoffroymontel - @snappizz is right. Please avoid "drive-by" fixes. Also, please make sure your files end in a newline - it currently doesn't (you can see this in the diff view in the screenshot here). I believe git will complain if you try to commit a change with bad whitespace (trailing whitespace, missing final newline). If it doesn't on your machine, you should configure it so it does.

image

If you don't want to manually redo the commits it's possible to split commits using git rebase [git help rebase, "SPLITTING COMMITS" section]. I can help with that here, via email or slack.

@@ -89,7 +89,7 @@ View : QObject {
this.background = color;
}

backgroundImage_ { arg image; this.setBackgroundImage(image) }
backgroundImage_ { arg image; this.setBackgroundImage(image) }
Copy link
Contributor

Choose a reason for hiding this comment

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

this change shouldn't be here.. it looks like all you really need to do for this PR is make the single change to the other line in QImage.sc. I would recommend making that change and force pushing to update this branch, then making the gitignore PR separately. If you want help with that I can give more advice here, via email or slack.

@geoffroymontel geoffroymontel force-pushed the topic/fixes-image-constructor-with-filename branch from 55b237a to 40e03e0 Compare September 24, 2018 09:27
@geoffroymontel
Copy link
Contributor Author

Thanks for your feedbacks @brianlheim and @snappizz, I used git rebase -i for the first time and cleaned up the history

Copy link
Contributor

@nhthn nhthn left a comment

Choose a reason for hiding this comment

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

thanks!

@nhthn nhthn merged commit f27885f into supercollider:develop Sep 24, 2018
nhthn pushed a commit that referenced this pull request Sep 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: Qt GUI sclang Qt components -- for IDE tickets, use "env: SCIDE" instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image.new(filePath) does not work on develop
3 participants