Bläddra i källkod

- small changes

Marius Stanciu 6 år sedan
förälder
incheckning
7d0a792085
3 ändrade filer med 8 tillägg och 40 borttagningar
  1. 2 1
      FlatCAMApp.py
  2. 4 18
      flatcamGUI/PreferencesUI.py
  3. 2 21
      flatcamGUI/VisPyCanvas.py

+ 2 - 1
FlatCAMApp.py

@@ -8465,7 +8465,7 @@ class App(QtCore.QObject):
                         self.draw_moving_selection_shape(self.pos, pos, color=self.defaults['global_alt_sel_line'],
                                                          face_color=self.defaults['global_alt_sel_fill'])
                         self.selection_type = False
-                    elif dx > 0:
+                    elif dx >= 0:
                         self.draw_moving_selection_shape(self.pos, pos)
                         self.selection_type = True
                     else:
@@ -8862,6 +8862,7 @@ class App(QtCore.QObject):
         pt4 = (float(sel_obj.options['xmin']), float(sel_obj.options['ymax']))
 
         sel_rect = Polygon([pt1, pt2, pt3, pt4])
+
         if self.defaults['units'].upper() == 'MM':
             sel_rect = sel_rect.buffer(-0.1)
             sel_rect = sel_rect.buffer(0.2)

+ 4 - 18
flatcamGUI/PreferencesUI.py

@@ -333,7 +333,8 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI):
         # Theme selection
         self.theme_label = QtWidgets.QLabel('%s:' % _('Theme'))
         self.theme_label.setToolTip(
-            _("Select a theme for FlatCAM.")
+            _("Select a theme for FlatCAM.\n"
+              "It will theme the plot area.")
         )
 
         self.theme_radio = RadioSet([
@@ -356,6 +357,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI):
         self.theme_button = FCButton(_("Apply Theme"))
         self.theme_button.setToolTip(
             _("Select a theme for FlatCAM.\n"
+              "It will theme the plot area.\n"
               "The application will restart after change.")
         )
         grid0.addWidget(self.theme_button, 2, 0, 1, 3)
@@ -1587,14 +1589,6 @@ class GeneralAppPrefGroupUI(OptionsGroupUI):
               "After change, it will be applied at next App start.")
         )
         self.worker_number_sb = FCSpinner()
-        self.worker_number_sb.setToolTip(
-            _("The number of Qthreads made available to the App.\n"
-              "A bigger number may finish the jobs more quickly but\n"
-              "depending on your computer speed, may make the App\n"
-              "unresponsive. Can have a value between 2 and 16.\n"
-              "Default value is 2.\n"
-              "After change, it will be applied at next App start.")
-        )
         self.worker_number_sb.set_range(2, 16)
 
         grid0.addWidget(self.worker_number_label, 25, 0)
@@ -1604,21 +1598,13 @@ class GeneralAppPrefGroupUI(OptionsGroupUI):
         tol_label = QtWidgets.QLabel('%s:' % _("Geo Tolerance"))
         tol_label.setToolTip(_(
             "This value can counter the effect of the Circle Steps\n"
-            "parameter. Default value is 0.01.\n"
+            "parameter. Default value is 0.005.\n"
             "A lower value will increase the detail both in image\n"
             "and in Gcode for the circles, with a higher cost in\n"
             "performance. Higher value will provide more\n"
             "performance at the expense of level of detail."
         ))
         self.tol_entry = FCDoubleSpinner()
-        self.tol_entry.setToolTip(_(
-            "This value can counter the effect of the Circle Steps\n"
-            "parameter. Default value is 0.01.\n"
-            "A lower value will increase the detail both in image\n"
-            "and in Gcode for the circles, with a higher cost in\n"
-            "performance. Higher value will provide more\n"
-            "performance at the expense of level of detail."
-        ))
         self.tol_entry.setSingleStep(0.001)
         self.tol_entry.set_precision(6)
 

+ 2 - 21
flatcamGUI/VisPyCanvas.py

@@ -24,24 +24,16 @@ black = Color("#000000")
 class VisPyCanvas(scene.SceneCanvas):
 
     def __init__(self, config=None):
-        print("vp_1")
-        try:
-            # scene.SceneCanvas.__init__(self, keys=None, config=config)
-            super().__init__(config=config, keys=None)
-        except Exception as e:
-            print("VisPyCanvas.__init__() -> %s" % str(e))
-
-        print("vp_2")
+        # scene.SceneCanvas.__init__(self, keys=None, config=config)
+        super().__init__(config=config, keys=None)
 
         self.unfreeze()
-        print("vp_3")
 
         settings = QSettings("Open Source", "FlatCAM")
         if settings.contains("axis_font_size"):
             a_fsize = settings.value('axis_font_size', type=int)
         else:
             a_fsize = 8
-        print("vp_4")
 
         if settings.contains("theme"):
             theme = settings.value('theme', type=str)
@@ -59,8 +51,6 @@ class VisPyCanvas(scene.SceneCanvas):
             # back_color = Color('#272822') # darker
             # back_color = Color('#3c3f41') # lighter
 
-        print("vp_5")
-
         self.central_widget.bgcolor = back_color
         self.central_widget.border_color = back_color
 
@@ -70,8 +60,6 @@ class VisPyCanvas(scene.SceneCanvas):
         top_padding = self.grid_widget.add_widget(row=0, col=0, col_span=2)
         top_padding.height_max = 0
 
-        print("vp_6")
-
         self.yaxis = scene.AxisWidget(
             orientation='left', axis_color=tick_color, text_color=tick_color, font_size=a_fsize, axis_width=1
         )
@@ -89,13 +77,9 @@ class VisPyCanvas(scene.SceneCanvas):
         # right_padding.width_max = 24
         right_padding.width_max = 0
 
-        print("vp_7")
-
         view = self.grid_widget.add_view(row=1, col=1, border_color=tick_color, bgcolor=theme_color)
         view.camera = Camera(aspect=1, rect=(-25, -25, 150, 150))
 
-        print("vp_8")
-
         # Following function was removed from 'prepare_draw()' of 'Grid' class by patch,
         # it is necessary to call manually
         self.grid_widget._update_child_widget_dim()
@@ -118,10 +102,7 @@ class VisPyCanvas(scene.SceneCanvas):
         else:
             self.grid = scene.GridLines(parent=self.view.scene, color='#dededeff')
 
-        print("vp_9")
-
         self.grid.set_gl_state(depth_test=False)
-        print("vp_10")
 
         self.freeze()