do not allow to change storage folder as long as monitoring is active
This commit is contained in:
@@ -783,7 +783,6 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
|||||||
+ UiSharedService.TooltipSeparator + "Hold CTRL to enable this button");
|
+ UiSharedService.TooltipSeparator + "Hold CTRL to enable this button");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_uiShared.DrawCacheDirectorySetting();
|
_uiShared.DrawCacheDirectorySetting();
|
||||||
ImGui.TextUnformatted($"Currently utilized local storage: {UiSharedService.ByteToString(_uiShared.FileCacheSize)}");
|
ImGui.TextUnformatted($"Currently utilized local storage: {UiSharedService.ByteToString(_uiShared.FileCacheSize)}");
|
||||||
bool isLinux = Util.IsWine();
|
bool isLinux = Util.IsWine();
|
||||||
|
|||||||
@@ -594,9 +594,9 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
|||||||
ImGui.InputText("Storage Folder##cache", ref cacheDirectory, 255, ImGuiInputTextFlags.ReadOnly);
|
ImGui.InputText("Storage Folder##cache", ref cacheDirectory, 255, ImGuiInputTextFlags.ReadOnly);
|
||||||
|
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
ImGui.PushFont(UiBuilder.IconFont);
|
using (ImRaii.Disabled(_cacheMonitor.MareWatcher != null))
|
||||||
string folderIcon = FontAwesomeIcon.Folder.ToIconString();
|
{
|
||||||
if (ImGui.Button(folderIcon + "##chooseCacheFolder"))
|
if (NormalizedIconButton(FontAwesomeIcon.Folder))
|
||||||
{
|
{
|
||||||
FileDialogManager.OpenFolderDialog("Pick Loporrit Storage Folder", (success, path) =>
|
FileDialogManager.OpenFolderDialog("Pick Loporrit Storage Folder", (success, path) =>
|
||||||
{
|
{
|
||||||
@@ -612,7 +612,6 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
|||||||
&& Directory.Exists(path)
|
&& Directory.Exists(path)
|
||||||
&& _isDirectoryWritable
|
&& _isDirectoryWritable
|
||||||
&& !_isPenumbraDirectory
|
&& !_isPenumbraDirectory
|
||||||
&& !_isOneDrive
|
|
||||||
&& !_cacheDirectoryHasOtherFilesThanCache
|
&& !_cacheDirectoryHasOtherFilesThanCache
|
||||||
&& _cacheDirectoryIsValidPath)
|
&& _cacheDirectoryIsValidPath)
|
||||||
{
|
{
|
||||||
@@ -623,7 +622,11 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
ImGui.PopFont();
|
}
|
||||||
|
if (_cacheMonitor.MareWatcher != null)
|
||||||
|
{
|
||||||
|
AttachToolTip("Stop the Monitoring before changing the Storage folder. As long as monitoring is active, you cannot change the Storage folder location.");
|
||||||
|
}
|
||||||
|
|
||||||
if (_isPenumbraDirectory)
|
if (_isPenumbraDirectory)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user