Skip to content

Commit d11e5e6

Browse files
committed
ShowFailNavMsg
1 parent 9284991 commit d11e5e6

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

QTTabBar/QTTabBarClass.cs

+13-6
Original file line numberDiff line numberDiff line change
@@ -7416,6 +7416,9 @@ public bool HideExplorer
74167416
protected ToolStripDropDownButton buttonNavHistoryMenu;
74177417
protected IntPtr TravelToolBarHandle;
74187418

7419+
/**
7420+
* 添加到历史目录
7421+
*/
74197422
protected void AddToHistory(QTabItem closingTab)
74207423
{
74217424
string currentPath = closingTab.CurrentPath;
@@ -7426,6 +7429,7 @@ protected void AddToHistory(QTabItem closingTab)
74267429
currentPath = currentPath + "???" + closingTab.GetLogHash(true, 0);
74277430
}
74287431
StaticReg.ClosedTabHistoryList.Add(currentPath);
7432+
// windows 11 ,有可能调用 WindowsUtil.close 方法导致报错
74297433
InstanceManager.ButtonBarBroadcast(bbar => bbar.RefreshButtons(), true);
74307434
}
74317435
}
@@ -7555,12 +7559,15 @@ protected void ShowMessageNavCanceled(string failedPath, bool fModal)
75557559
{
75567560
QTUtility2.log("QTTabBarClass ShowMessageNavCanceled: " + failedPath);
75577561
QTUtility2.MakeErrorLog(null, string.Format("Failed navigation: {0}", failedPath));
7558-
MessageForm.Show(ExplorerHandle,
7559-
string.Format(QTUtility.TextResourcesDic["TabBar_Message"][0], failedPath),
7560-
string.Empty,
7561-
MessageBoxIcon.Asterisk,
7562-
0x2710,
7563-
fModal);
7562+
if (Config.Window.ShowFailNavMsg)
7563+
{
7564+
MessageForm.Show(ExplorerHandle,
7565+
string.Format(QTUtility.TextResourcesDic["TabBar_Message"][0], failedPath),
7566+
string.Empty,
7567+
MessageBoxIcon.Asterisk,
7568+
0x2710,
7569+
fModal);
7570+
}
75647571
}
75657572

75667573
protected void CancelFailedTabChanging(string newPath)

0 commit comments

Comments
 (0)