mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Fix IDE 'SecondaryAllowClose' on inactive tabs
When closing secondary IDE Windows that have changes for inactive sourceViewPanels the current logic checks 'mWidgetWindow' against the window to decide if it should be included in the close query. Inactive tabs always have null mWidgetWindows so the changes are not seen. This fixes the 'Save' button case for inactive SourceViewPanels by using per-window visitors.
This commit is contained in:
parent
9fbfcb7a07
commit
21f2edd8b0
1 changed files with 4 additions and 4 deletions
|
@ -1243,9 +1243,9 @@ namespace IDE
|
|||
|
||||
List<String> changedList = scope List<String>();
|
||||
defer ClearAndDeleteItems(changedList);
|
||||
WithSourceViewPanels(scope (sourceViewPanel) =>
|
||||
WithSourceViewPanelsOf(window, scope (sourceViewPanel) =>
|
||||
{
|
||||
if ((sourceViewPanel.mWidgetWindow == window) && (sourceViewPanel.HasUnsavedChanges()))
|
||||
if (sourceViewPanel.HasUnsavedChanges())
|
||||
{
|
||||
var fileName = new String();
|
||||
Path.GetFileName(sourceViewPanel.mFilePath, fileName);
|
||||
|
@ -1260,9 +1260,9 @@ namespace IDE
|
|||
bool hadError = false;
|
||||
// We use a close delay after saving so the user can see we actually saved before closing down
|
||||
var _this = this;
|
||||
WithSourceViewPanels(scope [&] (sourceViewPanel) =>
|
||||
WithSourceViewPanelsOf(window, scope [&] (sourceViewPanel) =>
|
||||
{
|
||||
if ((!hadError) && (sourceViewPanel.mWidgetWindow == window) && (sourceViewPanel.HasUnsavedChanges()))
|
||||
if ((!hadError) && (sourceViewPanel.HasUnsavedChanges()))
|
||||
if (!_this.SaveFile(sourceViewPanel))
|
||||
hadError = true;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue