aboutsummaryrefslogtreecommitdiff
path: root/src/Interface
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2022-02-02 18:34:32 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2022-02-02 18:34:32 +0300
commit5001219695090d4a6ead73b2d17434b0805516a3 (patch)
treed94d40a4b13f907f3315eb81dde0d5d3963e26de /src/Interface
parent9018d7d504dfebbec9a3c75851314d25d1e8197c (diff)
Do not delete template path on registry key if cancel pick template dialog
Diffstat (limited to 'src/Interface')
-rw-r--r--src/Interface/Dialog.cs4
-rw-r--r--src/Interface/RibbonController.cs6
2 files changed, 7 insertions, 3 deletions
diff --git a/src/Interface/Dialog.cs b/src/Interface/Dialog.cs
index 806e92d..23f65d7 100644
--- a/src/Interface/Dialog.cs
+++ b/src/Interface/Dialog.cs
@@ -16,9 +16,9 @@ namespace RehauSku.Interface
{
return dialog.FileName;
}
- }
- return string.Empty;
+ else return string.Empty;
+ }
}
public static string[] GetMultiplyFiles()
diff --git a/src/Interface/RibbonController.cs b/src/Interface/RibbonController.cs
index b2e7b28..822fe98 100644
--- a/src/Interface/RibbonController.cs
+++ b/src/Interface/RibbonController.cs
@@ -91,7 +91,11 @@ namespace RehauSku.Interface
public void OnSetPricePressed(IRibbonControl control)
{
string path = Dialog.GetFilePath();
- RegistryUtil.PriceListPath = path;
+
+ if (!string.IsNullOrEmpty(path))
+ {
+ RegistryUtil.PriceListPath = path;
+ }
}
}
}