Skip to content

Commit 0d2411a

Browse files
committed
Bugfix: removing empty entries;
Implementation: Clear Entry;
1 parent 24ab06a commit 0d2411a

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

ReceiptOverview/ViewModels/MainWindowViewModel.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ private async Task ExportToCsv()
284284
{
285285
CsvExport = new CsvExport();
286286
CsvExport.ExportToCsV(Logic);
287-
var title = "CSV Export";
288-
var message = "Export done";
287+
var title = "CSV Export done";
288+
var message = "Export done. See: Installation directory -> Export -> Positions.csv";
289289

290290
SimpleMessageBoxViewModel dialog = new(title, message, false);
291291
await ShowDialog.Handle(dialog);
@@ -324,10 +324,10 @@ private void CopyEntry()
324324

325325
private void ClearEntry()
326326
{
327-
CurrentEntry = new EntryViewModel();
327+
CreateEmptyCurrentEntry(CurrentPosition.Id);
328328
}
329-
330-
329+
330+
331331
private string GetConnectionErrorMessage()
332332
{
333333
StringBuilder errorMessage = new();

ReceiptOverview/Views/MainWindow.axaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,16 +275,16 @@
275275
Name="DockEntryButtons"
276276
Margin="0,5,0,25">
277277
<StackPanel Orientation="Horizontal">
278-
<Button Margin="0,0,5,0"
279-
HorizontalAlignment="Stretch"
278+
<Button Margin="0,0,5,0"
279+
HorizontalAlignment="Stretch" ToolTip.Tip="Clears the Entry fields to add a new entry"
280280
Command="{Binding ClearEntryCommand}"
281281
IsTabStop="False"
282282
Name="BtnClearEntry">
283283
<Button.Template>
284284
<ControlTemplate>
285285
<Border Background="{TemplateBinding Background}"
286286
VerticalAlignment="Center"
287-
HorizontalAlignment="Stretch"
287+
HorizontalAlignment="Stretch"
288288
BorderThickness="8"
289289
CornerRadius="3">
290290
<StackPanel Orientation="Horizontal"
@@ -302,7 +302,7 @@
302302
</Button>
303303

304304
<Button Margin="0,0,5,0"
305-
HorizontalAlignment="Stretch"
305+
HorizontalAlignment="Stretch" ToolTip.Tip="Adds the entry to the collection"
306306
Command="{Binding NewEntryCommand}"
307307
IsTabStop="False"
308308
Name="BtnSaveEntry"

0 commit comments

Comments
 (0)