From cb04cd6cdac023798ed05e08a23e2aab72b0da4b Mon Sep 17 00:00:00 2001 From: tatiana Date: Mon, 8 Mar 2010 14:55:46 +0000 Subject: [PATCH] FIX: Show project changed dialog when measure is added or removed (fix #225) --- invesalius/data/measures.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/invesalius/data/measures.py b/invesalius/data/measures.py index dd0444a..d52902d 100644 --- a/invesalius/data/measures.py +++ b/invesalius/data/measures.py @@ -9,6 +9,7 @@ import vtk import constants as const import project as prj +import session as ses TYPE = {const.LINEAR: _(u"Linear"), const.ANGULAR: _(u"Angular"), @@ -61,6 +62,9 @@ class MeasurementManager(object): else: ps.Publisher().sendMessage('Update slice viewer') + session = ses.Session() + session.SaveProject() + def _add_point(self, pubsub_evt): position = pubsub_evt.data[0] type = pubsub_evt.data[1] # Linear or Angular @@ -109,6 +113,9 @@ class MeasurementManager(object): else: ps.Publisher().sendMessage('Update slice viewer') + session = ses.Session() + session.ChangeProject() + self.current = (m, mr) mr = self.current[1] @@ -146,7 +153,6 @@ class MeasurementManager(object): self.measures[index][0].name = new_name def _remove_measurements(self, pubsub_evt): - print "---- measures: _remove_measurements" indexes = pubsub_evt.data print indexes for index in indexes: @@ -158,6 +164,9 @@ class MeasurementManager(object): ps.Publisher().sendMessage('Update slice viewer') ps.Publisher().sendMessage('Render volume viewer') + session = ses.Session() + session.ChangeProject() + def _set_visibility(self, pubsub_evt): index, visibility = pubsub_evt.data m, mr = self.measures[index] -- libgit2 0.21.2