Skip to content

Commit

Permalink
fix(grid): only disable when property exists
Browse files Browse the repository at this point in the history
  • Loading branch information
hasecilu committed Nov 10, 2024
1 parent d45811b commit fe01351
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [2.1.1] - 2024-11-10

### Fixed

* Only disable `ExtraBottomMaterial` when it exists

## [2.1.0] - 2024-11-10

### Added
Expand Down Expand Up @@ -128,3 +134,4 @@
[2.0.0]: https://github.com/instancezero/in3dca-freegrid/releases/tag/2.0.0
[2.0.1]: https://github.com/instancezero/in3dca-freegrid/releases/tag/2.0.1
[2.1.0]: https://github.com/instancezero/in3dca-freegrid/releases/tag/2.1.0
[2.1.1]: https://github.com/instancezero/in3dca-freegrid/releases/tag/2.1.1
2 changes: 1 addition & 1 deletion freecad/freegrid/FreeGridCmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def onChanged(self, obj, prop):
if prop == "IncludeMagnets":
obj.setEditorMode("MagnetDiameter", not obj.IncludeMagnets)
obj.setEditorMode("MagnetHeight", not obj.IncludeMagnets)
elif prop == "IsSubtractive":
elif prop == "IsSubtractive" and hasattr(self, "ExtraBottomMaterial"):
obj.setEditorMode("ExtraBottomMaterial", not obj.IsSubtractive)

def generate_grid(self, obj) -> Part.Shape:
Expand Down
2 changes: 1 addition & 1 deletion freecad/freegrid/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import FreeCAD

__version__ = "2.1.0"
__version__ = "2.1.1"

path = os.path.join(os.path.dirname(__file__), "resources")

Expand Down
4 changes: 2 additions & 2 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

<description>A simple tools workbench for generating FreeGrid storage system components.</description>

<version>2.1.0</version>
<version>2.1.1</version>

<date>2024-11-07</date>
<date>2024-11-10</date>

<maintainer>Alan Langford</maintainer>

Expand Down

0 comments on commit fe01351

Please sign in to comment.