[meld] vcview: Unindent an early return pattern
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] vcview: Unindent an early return pattern
- Date: Fri, 1 Sep 2017 20:19:37 +0000 (UTC)
commit b9cc5d3f7f4d148bc531f82dbeb5381d4af187f8
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Sep 2 06:15:56 2017 +1000
vcview: Unindent an early return pattern
meld/vcview.py | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/a/b b/a/b
new file mode 100644
index 0000000..e69de29
diff --git a/meld/vcview.py b/meld/vcview.py
index 0476d5b..388595a 100644
--- a/meld/vcview.py
+++ b/meld/vcview.py
@@ -684,17 +684,17 @@ class VcView(melddoc.MeldDoc, gnomeglade.Component):
def refresh_partial(self, where):
if not self.actiongroup.get_action("VcFlatten").get_active():
it = self.find_iter_by_name(where)
- if it:
- newiter = self.model.insert_after(None, it)
- self.model.set_value(
- newiter, tree.COL_PATH, where)
- self.model.set_path_state(newiter, 0, tree.STATE_NORMAL, True)
- self.model.remove(it)
- self.treeview.grab_focus()
- self.treeview.get_selection().select_iter(newiter)
- self.scheduler.add_task(self._search_recursively_iter(newiter))
- self.scheduler.add_task(self.on_treeview_selection_changed)
- self.scheduler.add_task(self.on_treeview_cursor_changed)
+ if not it:
+ return
+ newiter = self.model.insert_after(None, it)
+ self.model.set_value(newiter, tree.COL_PATH, where)
+ self.model.set_path_state(newiter, 0, tree.STATE_NORMAL, True)
+ self.model.remove(it)
+ self.treeview.grab_focus()
+ self.treeview.get_selection().select_iter(newiter)
+ self.scheduler.add_task(self._search_recursively_iter(newiter))
+ self.scheduler.add_task(self.on_treeview_selection_changed)
+ self.scheduler.add_task(self.on_treeview_cursor_changed)
else:
# XXX fixme
self.refresh()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]