From dc0824419df27a985dbd6f87be273eb2d3f0f4e9 Mon Sep 17 00:00:00 2001 From: Husky Date: Tue, 24 Jul 2018 10:15:32 +0200 Subject: [PATCH] Es kam mal den Index -1 und pfad combi ist falsch gewesen --- SanSystem/UCSchachtanbindung.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SanSystem/UCSchachtanbindung.cs b/SanSystem/UCSchachtanbindung.cs index 5dc2832..611c1e7 100644 --- a/SanSystem/UCSchachtanbindung.cs +++ b/SanSystem/UCSchachtanbindung.cs @@ -106,7 +106,7 @@ namespace SanSystem schacht.SavedBilders.Remove(bild); pt_box.Image = null; pt_box.Dispose(); - File.Delete(Path.Combine(Global.Instance.Projektpfad, bild.Speicherpfad)); + //File.Delete(bild.Speicherpfad); lb_pictures.DataSource = null; lb_pictures.DataSource = schacht.SavedBilders; } @@ -118,6 +118,7 @@ namespace SanSystem ListBox listBox = (ListBox)sender; if (listBox == null) return; int index = listBox.SelectedIndex; + if (index == -1) return; string pfad = Path.Combine(schacht.SavedBilders[index].Speicherpfad); if (!File.Exists(pfad))