Skip to content
Snippets Groups Projects
Commit 62ec8c58 authored by George Nachman's avatar George Nachman
Browse files

Fix bug where TABVIEW would have two subviews. You can't change a PTYTab's...

Fix bug where TABVIEW would have two subviews. You can't change a PTYTab's root_; it's bound for life.
parent 8832071a
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -92,6 +92,9 @@
 
@property(nonatomic, assign, getter=isBroadcasting) BOOL broadcasting;
 
// uniqueId lazily auto-assigns a unique id unless you assign it a value first. It is never 0.
@property(nonatomic, assign) int uniqueId;
// init/dealloc
- (id)initWithSession:(PTYSession*)session;
- (id)initWithRoot:(NSSplitView*)root;
Loading
Loading
@@ -248,7 +251,6 @@
- (BOOL)canMoveCurrentSessionDividerBy:(int)direction horizontally:(BOOL)horizontally;
 
- (void)swapSession:(PTYSession *)session1 withSession:(PTYSession *)session2;
- (int)uniqueId;
- (NSIndexPath *)pathToSplitPaneWithSession:(PTYSession *)session;
- (BOOL)insertSession:(PTYSession *)aSession
atPath:(NSIndexPath *)indexPath
Loading
Loading
Loading
Loading
@@ -2075,18 +2075,23 @@ static NSString* FormatRect(NSRect r) {
aSession.tab = self;
}
for (PTYSplitView *splitview in [self splitters]) {
splitview.delegate = nil;
if (splitview != root_) {
splitview.delegate = nil;
}
}
for (PTYSplitView *splitview in [tabToGut splitters]) {
splitview.delegate = self;
if (splitview != tabToGut->root_) {
splitview.delegate = self;
}
}
while (root_.subviews.count) {
[root_.subviews[0] removeFromSuperview];
}
while (tabToGut->root_.subviews.count) {
[root_ addSubview:tabToGut->root_.subviews[0]];
}
NSSplitView *temp = root_;
root_ = tabToGut->root_;
root_.delegate = self;
[[[self tabViewItem] tabView] addSubview:root_];
 
[temp removeFromSuperview];
tabToGut->root_ = temp;
}
 
- (void)enableFlexibleView
Loading
Loading
Loading
Loading
@@ -4528,6 +4528,7 @@ NSString *kSessionsKVCKey = @"sessions";
inTerminal:self
hasFlexibleView:NO
viewMap:theMap];
tab.uniqueId = tabUniqueId;
for (id theKey in theMap) {
PTYSession *session = theMap[theKey];
assert([session revive]); // TODO: This isn't guarantted
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment