Просмотр исходного кода

- finished work on object hovering

Marius Stanciu 6 лет назад
Родитель
Сommit
85ff3805ae
3 измененных файлов с 13 добавлено и 7 удалено
  1. 8 7
      FlatCAMApp.py
  2. 1 0
      FlatCAMObj.py
  3. 4 0
      README.md

+ 8 - 7
FlatCAMApp.py

@@ -94,7 +94,7 @@ class App(QtCore.QObject):
 
     # Version
     version = 8.911
-    version_date = "2019/03/2"
+    version_date = "2019/03/4"
     beta = True
 
     # current date now
@@ -2467,6 +2467,7 @@ class App(QtCore.QObject):
                 obj.options[oname] = self.options[option]
 
         obj.isHovering = False
+        obj.notHovering = True
 
         # Initialize as per user request
         # User must take care to implement initialize
@@ -4748,15 +4749,15 @@ class App(QtCore.QObject):
                                      (obj.options['xmin'], obj.options['ymax'])]
                                 )
                                 if Point(pos).within(poly_obj):
-                                    if self.isHovering is False:
-                                        self.isHovering = True
-                                        self.notHovering = True
+                                    if obj.isHovering is False:
+                                        obj.isHovering = True
+                                        obj.notHovering = True
                                         # create the selection box around the selected object
                                         self.draw_hover_shape(obj, color='#d1e0e0')
                                 else:
-                                    if self.notHovering is True:
-                                        self.notHovering = False
-                                        self.isHovering = False
+                                    if obj.notHovering is True:
+                                        obj.notHovering = False
+                                        obj.isHovering = False
                                         self.delete_hover_shape()
                     except:
                         # the Exception here will happen if we try to select on screen and we have an newly (and empty)

+ 1 - 0
FlatCAMObj.py

@@ -80,6 +80,7 @@ class FlatCAMObj(QtCore.QObject):
         self._drawing_tolerance = 0.01
 
         self.isHovering = False
+        self.notHovering = True
 
         # assert isinstance(self.ui, ObjectUI)
         # self.ui.name_entry.returnPressed.connect(self.on_name_activate)

+ 4 - 0
README.md

@@ -9,6 +9,10 @@ CAD program, and create G-Code for Isolation routing.
 
 =================================================
 
+4.03.2019
+
+- finished work on object hovering
+
 3.03.2019
 
 - minor UI changes for Gerber UI