1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 20:12:21 +02:00

Properly resize tabs when files rename

This commit is contained in:
Brian Fiete 2022-04-02 07:25:17 -07:00
parent 560a7eb7a7
commit ee27f6fd02

View file

@ -13200,13 +13200,15 @@ namespace IDE
if (Path.Equals(sourceViewPanel.mFilePath, oldPath)) if (Path.Equals(sourceViewPanel.mFilePath, oldPath))
{ {
var sourceViewTab = (IDEApp.SourceViewTabButton)tab; var sourceViewTab = (IDEApp.SourceViewTabButton)tab;
//TODO: We might have to resize the label here?
//sourceViewPanel.mFilePath.Set(newPath);
sourceViewPanel.PathChanged(newPath); sourceViewPanel.PathChanged(newPath);
tab.Label = newFileName; tab.Label = newFileName;
tab.mWantWidth = sourceViewTab.GetWantWidth(); float newWidth = sourceViewTab.GetWantWidth();
//tab.mTabbedView.Resize(); if (newWidth != tab.mWantWidth)
{
tab.mWantWidth = newWidth;
tab.mTabbedView.mNeedResizeTabs = true;
}
} }
} }
}); });