-
Notifications
You must be signed in to change notification settings - Fork 100
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
CATTY-377 Add new object choose image before title #1682
base: develop
Are you sure you want to change the base?
CATTY-377 Add new object choose image before title #1682
Conversation
72e3528
to
426b59a
Compare
6f7a73d
to
971e33c
Compare
971e33c
to
0d4b972
Compare
return result; | ||
} | ||
// Alert for Objects with same name | ||
if ([[self.scene allObjectNames] containsObject:name]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to work, when trying to save an image with the same name, it just gets assigned a unique name (e.g. "Look (1)")
@@ -147,12 +114,47 @@ - (void)addObjectActionWithName:(NSString*)objectName | |||
ltvc.showAddLookActionSheetAtStartForScriptEditor = NO; | |||
ltvc.afterSafeBlock = ^(Look* look) { | |||
[self.navigationController popViewControllerAnimated:YES]; | |||
NSString *initialText = @""; | |||
if (look) { | |||
if (![look.name isEqual: @"look"]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for?
Default name for drawn images is "Look" (localized), when is this triggered?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently it used for showing the name of the downloaded image from the media library. At the moment it looks like: 1) Media Library -> the name is prefilled with the name on the media library.
2) Drawing Image -> there is no prefilled name. It's empty.
3) choosing Image from phone -> the name is prefilled with "My image"
Is it ok when the prefilled string is empty for self drawing images?
[self showLoadingView]; | ||
[self.scene addObjectWithName:[Util uniqueName:objectName existingNames:[self.scene allObjectNames]]]; | ||
[self.scene addObjectWithName:@"default"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably initialize with localized "Look" and uniqueName Util, in case the app is killed when the alert is open.
3a63c83
to
a008b75
Compare
a008b75
to
ca22cc4
Compare
ca22cc4
to
44dc158
Compare
Fixed ProjectTVCTests
…github.com:amelak9/Catty into CATTY-377-Add-new-object-choose-image-before-title
When adding a new object in Catty, you first have to enter a name for the object, and then choose an image. This order should be changed so that first you have to select an image and then you have to enter a name for the object.
If an image is chosen from the media library, then the name for the object should be prefilled with the name of the downloaded image.