From 758b7a377c5fb9b4e12e2ad0b64cded99769c159 Mon Sep 17 00:00:00 2001 From: Inso <insomniak.fr@gmail.com> Date: Thu, 5 Nov 2015 22:22:02 +0100 Subject: [PATCH] Fix display bugs in graph & wot --- src/cutecoin/core/graph.py | 4 ++-- src/cutecoin/gui/views/wot.py | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/cutecoin/core/graph.py b/src/cutecoin/core/graph.py index 0b78fdbf..f76ccff7 100644 --- a/src/cutecoin/core/graph.py +++ b/src/cutecoin/core/graph.py @@ -227,7 +227,7 @@ class Graph(object): else: current_validations = 0 members_pubkeys = yield from self.community.members_pubkeys() - max_validation = self.community.network.fork_window(members_pubkeys) + 1 + max_validation = self.community.network.fork_window(members_pubkeys) # Current validation can be negative if self.community.network.current_blockid.number # is not refreshed yet @@ -305,7 +305,7 @@ class Graph(object): else: current_validations = 0 members_pubkeys = yield from self.community.members_pubkeys() - max_validations = self.community.network.fork_window(members_pubkeys) + 1 + max_validations = self.community.network.fork_window(members_pubkeys) if max_validations > current_validations > 0: if self.app.preferences['expert_mode']: diff --git a/src/cutecoin/gui/views/wot.py b/src/cutecoin/gui/views/wot.py index 64e803b5..cfa426ac 100644 --- a/src/cutecoin/gui/views/wot.py +++ b/src/cutecoin/gui/views/wot.py @@ -203,7 +203,10 @@ class Node(QGraphicsEllipseItem): self.status_wallet = self.metadata['status'] & NODE_STATUS_HIGHLIGHTED self.status_member = not self.metadata['status'] & NODE_STATUS_OUT self.text = self.metadata['text'] - self.setToolTip(self.metadata['tooltip']) + try: + self.setToolTip(self.metadata['tooltip']) + except TypeError: + raise self.arcs = [] self.menu = None self.action_sign = None -- GitLab