Fixed #104. Saving untitled documents now should work

This commit is contained in:
michael starke
2013-11-09 23:11:16 +01:00
parent 56938909df
commit e8a44117f4
2 changed files with 7 additions and 0 deletions

View File

@@ -63,6 +63,11 @@
}
- (void)updateView {
/*
Access view at least once to make sure it is properly loaded
*/
NSView *view = [self view];
NSAssert(view != nil, @"View has to be loaded at this point");
switch(self.document.versionForFileType) {
case KPKLegacyVersion:
[self.fileTypePopupButton selectItemAtIndex:1];
@@ -74,6 +79,7 @@
NSAssert(NO, @"Minimum Version should always be valid");
break;
}
[self setFileType:self.fileTypePopupButton];
[self _updateNote];
}

View File

@@ -62,6 +62,7 @@ NSString *const MPToolbarItemInspector = @"TOOLBAR_INSPECTOR";
NSPopUpButton *popupButton = [[NSPopUpButton alloc] initWithFrame:NSMakeRect(0, 0, 50, 32) pullsDown:YES];
[[popupButton cell] setBezelStyle:NSTexturedRoundedBezelStyle];
[[popupButton cell] setImageScaling:NSImageScaleProportionallyDown];
[popupButton setFocusRingType:NSFocusRingTypeNone];
[popupButton setTitle:@""];
[popupButton sizeToFit];