diff --git a/src/View/MainWindow.py b/src/View/MainWindow.py
index 49387884..fed284a7 100644
--- a/src/View/MainWindow.py
+++ b/src/View/MainWindow.py
@@ -41,6 +41,7 @@ no_model_action = [
model_action = [
"action_menu_close", "action_menu_edit", "action_menu_save",
"action_menu_save_as", "action_toolBar_close", "action_toolBar_save",
+ "action_menu_numerical_parameter",
]
other_model_action = [
@@ -117,6 +118,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
"action_menu_open": self.open_model,
"action_menu_save": self.save_study,
"action_menu_save_as": self.save_as_study,
+ "action_menu_numerical_parameter": self.open_solver_parameters,
"action_run_solver": self.run_solver,
## Help
"action_menu_about": self.open_about,
@@ -125,9 +127,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
"action_toolBar_open": self.open_model,
"action_toolBar_save": self.save_study,
"action_toolBar_close": self.close_model,
- "action_toolBar_run_solver": self.open_dummy,
- "action_toolBar_kill_solver": self.open_dummy,
- "action_toolBar_listing": self.open_dummy,
+ "action_toolBar_run_solver": self.run_solver,
## Current actions
"action_toolBar_network": self.open_network,
"action_toolBar_geometry": self.open_geometry,
diff --git a/src/View/Network/GraphWidget.py b/src/View/Network/GraphWidget.py
index 26aa87c2..2569497a 100644
--- a/src/View/Network/GraphWidget.py
+++ b/src/View/Network/GraphWidget.py
@@ -279,6 +279,7 @@ class GraphWidget(QGraphicsView):
self._selected_item = None
self._selected_new_edge_src_node = None
self._current_edge = None
+ self._current_moved_node = None
self.tmp_line = None
self.node_items = []
@@ -714,15 +715,16 @@ class GraphWidget(QGraphicsView):
self.clicked = False
if self._state == "move":
- pos = self.mapToScene(event.pos())
- self._undo.push(
- SetNodePosCommand(
- self._current_moved_node,
- (pos.x(), pos.y()),
- (self._mouse_origin_x,
- self._mouse_origin_y)
+ if self._current_moved_node is not None:
+ pos = self.mapToScene(event.pos())
+ self._undo.push(
+ SetNodePosCommand(
+ self._current_moved_node,
+ (pos.x(), pos.y()),
+ (self._mouse_origin_x,
+ self._mouse_origin_y)
+ )
)
- )
self.update()
super(GraphWidget, self).mouseReleaseEvent(event)
diff --git a/src/View/ui/MainWindow.ui b/src/View/ui/MainWindow.ui
index fa4be386..777288fe 100644
--- a/src/View/ui/MainWindow.ui
+++ b/src/View/ui/MainWindow.ui
@@ -151,10 +151,8 @@
&Execute
-
+
-
-
@@ -263,8 +261,6 @@
-
-
@@ -298,8 +294,6 @@
-
-
@@ -504,9 +498,12 @@
XYZ
-
+
- Numerical parameter for MAGE solver
+ Numerical parameter for solvers
+
+
+ Numerical parameter for solvers
@@ -696,7 +693,7 @@
- ressources/gtk-execute.pngressources/gtk-execute.png
+ ressources/player_play.pngressources/player_play.png
Run solver
diff --git a/src/config.py b/src/config.py
index 64f5664a..16421b8d 100644
--- a/src/config.py
+++ b/src/config.py
@@ -19,6 +19,8 @@ class Config(SQL):
self.filename = Config.filename()
self.set_default_value()
+ print(self.filename)
+
super(Config, self).__init__(filename = self.filename)
def _create(self):
@@ -226,7 +228,14 @@ class Config(SQL):
@classmethod
def filename(cls):
- return os.path.expanduser('~') + config_dir + config_file
+ file = ""
+
+ if os.name == 'posix':
+ file = os.path.expanduser('~') + config_dir + config_file
+ else:
+ file = os.path.expanduser('~') + config_file
+
+ return file
@classmethod
def languages(cls):