* GormCore/GormInspectorsManager.m (setCurrentInspector:): do not resize inspector

panel on inspector change.
This commit is contained in:
Sergii Stoian 2019-12-23 18:11:52 +02:00
parent ded77192c4
commit b04f63b4ff

View file

@ -273,14 +273,14 @@
- (void) setCurrentInspector: (id)anObj
{
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
NSArray *selection = [[(id<IB>)NSApp selectionOwner] selection];
unsigned count = [selection count];
id obj = [selection lastObject];
id<IBDocuments> document = [(id<IB>)NSApp activeDocument];
NSView *newView = nil;
NSView *oldView = nil;
NSString *newInspector = nil;
NSInteger tag = 0;
NSArray *selection = [[(id<IB>)NSApp selectionOwner] selection];
unsigned count = [selection count];
id obj = [selection lastObject];
id<IBDocuments> document = [(id<IB>)NSApp activeDocument];
NSView *newView = nil;
NSView *oldView = nil;
NSString *newInspector = nil;
NSInteger tag = 0;
if (anObj != self)
{
@ -401,12 +401,11 @@
panel. Is is needed because subsequent changes of object selection lead to
the cluttered inspector's UI otherwise.
*/
CGFloat delta = [newView frame].size.height - [oldView frame].size.height;
// CGFloat delta = [newView frame].size.height - [oldView frame].size.height;
rect.size.height = rect.size.height + delta;
rect.origin.y = [panel frame].origin.y - delta;
// [panel setContentSize: rect.size];
[panel setFrame: rect display: YES];
// rect.size.height = rect.size.height + delta;
// rect.origin.y = [panel frame].origin.y - delta;
// [panel setFrame: rect display: YES];
rect = [outer bounds];
@ -465,14 +464,15 @@
* Make the inspector view the correct size for the viewable panel,
* and set the frame size for the new contents before adding them.
*/
[inspectorView setFrame: rect];
rect.origin = NSZeroPoint;
[newView setFrame: rect];
// [inspectorView setFrame: rect];
// rect.origin = NSZeroPoint;
// [newView setFrame: rect];
RETAIN(oldView);
[inspectorView setContentView: newView];
[[prevInspector window] setContentView: oldView];
[outer setNeedsDisplay: YES];
// RELEASE(oldView);
RELEASE(oldView);
/* Set the default First responder to the new View */
if ( initialResponder )