[gnome-subtitles: 5/6] Make sure we clone the subtitle for Undo
- From: Pedro Castro <pcastro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-subtitles: 5/6] Make sure we clone the subtitle for Undo
- Date: Tue, 14 May 2019 07:44:40 +0000 (UTC)
commit 4946211f269c83a5a1f9f82fdc049ead3defc668
Author: Pedro Castro <pedro gnomesubtitles org>
Date: Tue May 14 08:43:26 2019 +0100
Make sure we clone the subtitle for Undo
src/GnomeSubtitles/Core/Command/InsertSubtitleCommand.cs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/GnomeSubtitles/Core/Command/InsertSubtitleCommand.cs
b/src/GnomeSubtitles/Core/Command/InsertSubtitleCommand.cs
index 9a30203..64261a4 100644
--- a/src/GnomeSubtitles/Core/Command/InsertSubtitleCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/InsertSubtitleCommand.cs
@@ -1,6 +1,6 @@
/*
* This file is part of Gnome Subtitles.
- * Copyright (C) 2006-2017 Pedro Castro
+ * Copyright (C) 2006-2019 Pedro Castro
*
* Gnome Subtitles is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -43,12 +43,12 @@ public abstract class InsertSubtitleCommand : SingleSelectionCommand {
public override bool Execute () {
InsertNew();
- subtitle = Base.Document.Subtitles[newPath];
+ subtitle = Base.Document.Subtitles[newPath].Clone(Base.Document.Subtitles.Properties);
return true;
}
public override void Undo () {
- bool selectNext = ((Path != null) && (Path.Compare(newPath) == 1));
+ bool selectNext = (Path != null) && (Path.Compare(newPath) == 1);
Base.Ui.View.Remove(newPath, selectNext);
}
@@ -151,4 +151,4 @@ public class InsertSubtitleAtVideoPositionCommand : InsertSubtitleCommand {
}
}
-}
+}
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]