- fixed an issue in Isolation Tool when running the app in Basic mode;
- fixed Paint, Isolation and NCC Tools such the translated comboboxes values are now stored as indexes instead of translated words as before - in Geometry Object made sure that the widgets in the Tool Table gets populated regardless of encountering non-recognizable translated values - in Paint Tool found a small bug and fixed it
This commit is contained in:
@@ -2160,6 +2160,17 @@ class FCComboBox(QtWidgets.QComboBox):
|
||||
self.setCurrentIndex(first)
|
||||
|
||||
|
||||
class FCComboBox2(FCComboBox):
|
||||
def __init__(self, parent=None, callback=None):
|
||||
super(FCComboBox2, self).__init__(parent=parent, callback=callback)
|
||||
|
||||
def get_value(self):
|
||||
return int(self.currentIndex())
|
||||
|
||||
def set_value(self, val):
|
||||
self.setCurrentIndex(val)
|
||||
|
||||
|
||||
class FCInputDialog(QtWidgets.QInputDialog):
|
||||
def __init__(self, parent=None, ok=False, val=None, title=None, text=None, min=None, max=None, decimals=None,
|
||||
init_val=None):
|
||||
|
||||
@@ -1714,7 +1714,7 @@ class GeometryObjectUI(ObjectUI):
|
||||
"- Line-based: Parallel lines.")
|
||||
)
|
||||
|
||||
self.polish_method_combo = FCComboBox()
|
||||
self.polish_method_combo = FCComboBox2()
|
||||
self.polish_method_combo.addItems(
|
||||
[_("Standard"), _("Seed"), _("Lines")]
|
||||
)
|
||||
|
||||
@@ -2,7 +2,7 @@ from PyQt5 import QtWidgets
|
||||
from PyQt5.QtCore import QSettings
|
||||
|
||||
from appGUI.GUIElements import FCDoubleSpinner, FCCheckBox, RadioSet, FCLabel, NumericalEvalTupleEntry, \
|
||||
NumericalEvalEntry, FCComboBox
|
||||
NumericalEvalEntry, FCComboBox2
|
||||
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
|
||||
|
||||
import gettext
|
||||
@@ -338,7 +338,7 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
|
||||
"- Line-based: Parallel lines.")
|
||||
)
|
||||
|
||||
self.polish_method_combo = FCComboBox()
|
||||
self.polish_method_combo = FCComboBox2()
|
||||
self.polish_method_combo.addItems(
|
||||
[_("Standard"), _("Seed"), _("Lines")]
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt5.QtCore import QSettings
|
||||
|
||||
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCComboBox, FCCheckBox, FCSpinner, NumericalEvalTupleEntry
|
||||
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCComboBox2, FCCheckBox, FCSpinner, NumericalEvalTupleEntry
|
||||
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
|
||||
|
||||
import gettext
|
||||
@@ -290,7 +290,7 @@ class ToolsISOPrefGroupUI(OptionsGroupUI):
|
||||
"- 'Polygon Selection' -> Isolate a selection of polygons.\n"
|
||||
"- 'Reference Object' - will process the area specified by another object.")
|
||||
)
|
||||
self.select_combo = FCComboBox()
|
||||
self.select_combo = FCComboBox2()
|
||||
self.select_combo.addItems(
|
||||
[_("All"), _("Area Selection"), _("Polygon Selection"), _("Reference Object")]
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt5.QtCore import QSettings
|
||||
|
||||
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCComboBox, FCCheckBox, NumericalEvalTupleEntry
|
||||
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, NumericalEvalTupleEntry, FCComboBox2
|
||||
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
|
||||
|
||||
import gettext
|
||||
@@ -225,7 +225,7 @@ class ToolsNCCPrefGroupUI(OptionsGroupUI):
|
||||
# {"label": _("Seed-based"), "value": "seed"},
|
||||
# {"label": _("Straight lines"), "value": "lines"}
|
||||
# ], orientation='vertical', stretch=False)
|
||||
self.ncc_method_combo = FCComboBox()
|
||||
self.ncc_method_combo = FCComboBox2()
|
||||
self.ncc_method_combo.addItems(
|
||||
[_("Standard"), _("Seed"), _("Lines"), _("Combo")]
|
||||
)
|
||||
@@ -304,7 +304,7 @@ class ToolsNCCPrefGroupUI(OptionsGroupUI):
|
||||
# {'label': _('Reference Object'), 'value': 'box'}],
|
||||
# orientation='vertical',
|
||||
# stretch=None)
|
||||
self.select_combo = FCComboBox()
|
||||
self.select_combo = FCComboBox2()
|
||||
self.select_combo.addItems(
|
||||
[_("Itself"), _("Area Selection"), _("Reference Object")]
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt5.QtCore import QSettings
|
||||
|
||||
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCComboBox, FCCheckBox, NumericalEvalTupleEntry
|
||||
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCComboBox2, FCCheckBox, NumericalEvalTupleEntry
|
||||
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
|
||||
|
||||
import gettext
|
||||
@@ -210,7 +210,7 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
|
||||
# {"label": _("Seed-based"), "value": "seed"},
|
||||
# {"label": _("Straight lines"), "value": "lines"}
|
||||
# ], orientation='vertical', stretch=False)
|
||||
self.paintmethod_combo = FCComboBox()
|
||||
self.paintmethod_combo = FCComboBox2()
|
||||
self.paintmethod_combo.addItems(
|
||||
[_("Standard"), _("Seed"), _("Lines"), _("Laser_lines"), _("Combo")]
|
||||
)
|
||||
@@ -273,9 +273,9 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
|
||||
# orientation='vertical',
|
||||
# stretch=None
|
||||
# )
|
||||
self.selectmethod_combo = FCComboBox()
|
||||
self.selectmethod_combo = FCComboBox2()
|
||||
self.selectmethod_combo.addItems(
|
||||
[_("Polygon Selection"), _("Area Selection"), _("All"), _("Reference Object")]
|
||||
[_("All"), _("Polygon Selection"), _("Area Selection"), _("Reference Object")]
|
||||
)
|
||||
|
||||
grid0.addWidget(selectlabel, 15, 0)
|
||||
|
||||
Reference in New Issue
Block a user