Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions mod/widgets/custom_widgets/size_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import FreeCAD

from mod.constants import DEFAULT_MIN_WIDGET_WIDTH, DEFAULT_MAX_WIDGET_WIDTH,AUTO_UNITS_SELECT
from mod.constants import DEFAULT_MIN_WIDGET_WIDTH, DEFAULT_MAX_WIDGET_WIDTH,AUTO_UNITS_SELECT,DEFAULT_DECIMALS
from mod.tools.dialog_tools import warning_dialog
from mod.tools.stdout_tools import debug
from mod.widgets.custom_widgets.base_units_input import BaseUnitsInput
Expand All @@ -11,8 +11,8 @@

class SizeInput(BaseUnitsInput):

def __init__(self, min_val=-10e12,max_val=10e12,minwidth=DEFAULT_MIN_WIDGET_WIDTH, maxwidth=DEFAULT_MAX_WIDGET_WIDTH,parent=None,value=0):#maxwidth=45
super().__init__(min_val,max_val,minwidth,maxwidth,parent)
def __init__(self, min_val=-10e12,max_val=10e12,minwidth=DEFAULT_MIN_WIDGET_WIDTH, maxwidth=DEFAULT_MAX_WIDGET_WIDTH,parent=None,value=0,decimals=DEFAULT_DECIMALS):#maxwidth=45
super().__init__(min_val,max_val,minwidth,maxwidth,parent,decimals)
# Initialize unit system
# self.quantity_box.setUnit("m") #<Not needed
self.setValue(value)
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/dock/dock_dp_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(self, parent=None):
self.dp_label = QtWidgets.QLabel(__("Inter-particle distance: "))
self.dp_label.setToolTip(__("Lower DP to have more particles in the case."))

self.dp_input = SizeInput()
self.dp_input = SizeInput(decimals=6)
self.dp_input.setToolTip(__("Lower DP to have more particles in the case."))
self.dp_input.setValue(Case.the().dp)
self.dp_input.value_changed.connect(self.on_dp_changed)
Expand Down