|
|
@@ -461,11 +461,12 @@ class Viewer(QMainWindow):
|
|
|
obj = core.Analyse.objects[index]
|
|
|
|
|
|
dlg = DetailsDialog(obj, self)
|
|
|
-
|
|
|
dlg.show()
|
|
|
r = dlg.exec_()
|
|
|
+
|
|
|
if r:
|
|
|
- pass
|
|
|
+ core.Analyse.build_trees()
|
|
|
+ self.maj_scene_with(obj)
|
|
|
|
|
|
def test(self):
|
|
|
self.run(Path(__file__).parent / r"test\source")
|
|
|
@@ -479,6 +480,8 @@ class Viewer(QMainWindow):
|
|
|
if e.key() == Qt.Key_Control:
|
|
|
self.ui.view.setDragMode(QGraphicsView.RubberBandDrag)
|
|
|
|
|
|
+
|
|
|
+
|
|
|
class DetailsDialog(QDialog):
|
|
|
|
|
|
def __init__(self, obj, parent=None):
|
|
|
@@ -494,6 +497,7 @@ class DetailsDialog(QDialog):
|
|
|
self.ui.btn_add.clicked.connect(self.add_mention)
|
|
|
self.ui.btn_edit.clicked.connect(self.edit_mention)
|
|
|
self.ui.btn_del.clicked.connect(self.del_mention)
|
|
|
+ self.ui.btn_ok.clicked.connect(self.ok)
|
|
|
|
|
|
self.ui.lbl_title.setText("{}: {}".format(self.obj.type_, self.obj.name_))
|
|
|
|
|
|
@@ -504,7 +508,6 @@ class DetailsDialog(QDialog):
|
|
|
|
|
|
self.load_table()
|
|
|
|
|
|
-
|
|
|
def load_table(self):
|
|
|
self.ui.tbl_mentions.setSortingEnabled(False)
|
|
|
self.ui.tbl_mentions.clearContents()
|
|
|
@@ -551,4 +554,6 @@ class DetailsDialog(QDialog):
|
|
|
del self.obj.mentions[index]
|
|
|
self.load_table()
|
|
|
|
|
|
+ def ok(self):
|
|
|
+ self.done(1)
|
|
|
|