From ee27f6fd02bb9712c32d63a952aeac4742ba3be4 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Sat, 2 Apr 2022 07:25:17 -0700 Subject: [PATCH] Properly resize tabs when files rename --- IDE/src/IDEApp.bf | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/IDE/src/IDEApp.bf b/IDE/src/IDEApp.bf index 9b90114a..5b67e03f 100644 --- a/IDE/src/IDEApp.bf +++ b/IDE/src/IDEApp.bf @@ -13200,13 +13200,15 @@ namespace IDE if (Path.Equals(sourceViewPanel.mFilePath, oldPath)) { var sourceViewTab = (IDEApp.SourceViewTabButton)tab; - - //TODO: We might have to resize the label here? - //sourceViewPanel.mFilePath.Set(newPath); + sourceViewPanel.PathChanged(newPath); tab.Label = newFileName; - tab.mWantWidth = sourceViewTab.GetWantWidth(); - //tab.mTabbedView.Resize(); + float newWidth = sourceViewTab.GetWantWidth(); + if (newWidth != tab.mWantWidth) + { + tab.mWantWidth = newWidth; + tab.mTabbedView.mNeedResizeTabs = true; + } } } });