[pitivi: 53/65] Changed PresetManager.renamePreset to change the name of the current preset, if this is the case. Th
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi: 53/65] Changed PresetManager.renamePreset to change the name of the current preset, if this is the case. Th
- Date: Mon, 4 Jul 2011 01:23:41 +0000 (UTC)
commit e4a87770962bff1252bbde6b3d112641487bf769
Author: Alex BÄluÈ <alexandru balut gmail com>
Date: Thu Jun 16 21:10:47 2011 +0200
Changed PresetManager.renamePreset to change the name of the current preset, if this is the case.
This makes its behaviour similar with PresetManager.removePreset's behaviour.
pitivi/ui/preset.py | 2 ++
pitivi/ui/projectsettings.py | 1 -
2 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/ui/preset.py b/pitivi/ui/preset.py
index 0dd0de5..f52be1b 100644
--- a/pitivi/ui/preset.py
+++ b/pitivi/ui/preset.py
@@ -156,6 +156,8 @@ class PresetManager(object):
old_name = self.ordered[path][0]
self.ordered[path][0] = new_name
self.presets[new_name] = self.presets.pop(old_name)
+ if self.cur_preset == old_name:
+ self.cur_preset = new_name
def getPresetNames(self):
return (row[0] for row in self.ordered)
diff --git a/pitivi/ui/projectsettings.py b/pitivi/ui/projectsettings.py
index 831cd69..50c5f74 100644
--- a/pitivi/ui/projectsettings.py
+++ b/pitivi/ui/projectsettings.py
@@ -284,7 +284,6 @@ class ProjectSettingsDialog():
def _presetNameEditedCb(self, renderer, path, new_text, mgr):
mgr.renamePreset(path, new_text)
- mgr.cur_preset = new_text
def _presetChangedCb(self, selection, mgr, update_preset_buttons_func):
"""Handle the selection of a preset."""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]