As the title says, if user selects `OK` button and has no Classification
selected (which can happen only if the list is empty I think), then they
get a traceback since we're trying to access list of selections
directly.
So this patch adds a small patch to close the form if user has pressed
`OK` button and did not select anything.
This function dates back to Qt3, and was removed in Qt4. Modern Qt no
longer uses this ui file entry, and in some circumstances the uic
complains about its presence.
Improvement to User Interactive Experience:
- The Window Interactive Tool would check if SketchArch-addon is enabled by user, i.e. if ArchSketckLock is checked.
- If not, the conventional creation behaviour is used, SketchArch properties would not be added to Window object.
- It also check if Base of Wall is ArchSketch or not.
Github Discussion:
- https://github.com/paullee0/FreeCAD_SketchArch/issues/27#issuecomment-2837652351
User has no possibility to change Sill parameter upon adding Window, it
is only possible while creating Window for the first time.
So this patch adds this parameter, and changing it moves the *BASE*
coordinate of the object in Z direction.
Currently if user selects an item and does `Isolate` operation on it in
BIM, everything is being hidden if the item was inside another container
(like Building).
This is because we are prioritizing on hiding parents of current object
if they are not the selected ones, which is causing the child of the
parent to be hidden as well (duh).
So, this patch fixes isolate method to hide all other parents and their
childs. If they are not a parent of our child under selection -> hide
them and proceed further. If we are processing parent of our selection,
just hide anything on current level that is not our selection while
leaving parent intact.
Currently there's no option for selecting active working plane other
than selecting `DoubleClickActivates` property on a BIM Level.
So, this patch adds an additional button for the submenu that BIM Views
provides - to activate working plane of the selected item.
Some of the objects, like Column, or Beam do not contain `IFC
Attributes` if they are initially created.
As it turns out, they are not being created as we are checking for
`onDocRestoredDone` attribute, which is assigned in `onDocumentRestored`
function. Since users can usually just not restore a document, but just
play on a newly created document, this attribute won't be available,
thus we won't be going through whole `onChanged` logic which populates
`IFC Attributes`.
To preserve current functionality of this additional parameter and not
cause the previous errors to happen, this patch just changes from the
custom flag to globally available `Restoring` flag which tracks document
being restored more reliably.
Fixes#21179.
This PR uses the built-in solution to close the task panel.
I was not aware of this feature before. My 2 previous PRs related to the closing of task panels, #20719 and #21073, will (largely) have to be reverted/redone in favor of this solution.
Currently, if user selects `Site` object in the Model tree, and hides it
while having `Compass` property selected to `true` and then unhides it,
the Compass is not appearing even though the property still remains to
be true.
This is because for the `Compass` property itself and `Visibility`
property we're using two different object types. For `Compass` property
we're using View provider geometry object, whereas for the `Visibility`
property we're using `Part::Feature` object. Since `Part::Feature`
object doesn't have compass attribute and Compass directly under it,
we're never hitting the logic to show the compass.
So, this patch just changes the object type that is being passed to
`updateCompassVisibility` during change of `Visibility` property, to
match the same object type passed during change of `Compass` property.
So, currently, if we use Vertical/Horizontal Dimension which is
constrained in one direction vector, upon `Continue`, the direction
vector is not being preserved.
The cause of that is that everytime we recall the command in Continue
Mode, we also call base class' `Activated` method, which in turn calls
`finish()` if we have already initialized an active Draft command. This
doesn't happen during first usage of the command, because this variable
is not yet populated, but upon second (and next) runs it is. In turn,
this causes to call `finish()`, and clean up the direction vector. So,
in essence, we are specifying the vector and cleaning it every
"Continue" run.
So, as a solution, just move the direction vector as an argument to
populate super class with it, and do that after super class' `Activated()`
call, so it won't get cleaned up in `finish()`.
Co-authored-by: Yorik van Havre <yorik@uncreated.net>
Fixes#17952.
This PR is a continuation of #20719.
It mainly involves adding `self.doc`. This new attribute is then also used in the rest of the modified classes. In some cases code was slightly reordered for consistency.
The `_finish_command_on_doc_close` function has been modifief to also handle `Gui.Snapper.ui.escape` and the code in gui_arcs.py has been updated accordingly.
Additionally:
Removed the `done` and `spacedone` variables in BimWall.py by tweaking the code.
Due to the use of an incorrect exponentiation operator the following
exception was triggered when changing attributes of a wave profile:
TypeError: Unsupported operand type(s) for ^: 'float' and 'float'
fixes#21048
Currently user has no possibility to insert Window to the host, if the
host is a Curtain Wall.
Solution is simple - just populate the array of acceptable hosts that
haven't been extended.
NOTE: Although this feels wrong, I've noted to change it as having some
kind of an internal flag allowing for add/remove for the host, since
extending this array looks like a really bad approach.
* BIM: add tooltip info on how to insert the view on a particular page
* Fix typo
* BIM: split tooltip comment for better code readability
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
---------
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
* [ArchStairs] ArchSketch Support and Refactoring Phase 2
Phase 2 Subsequent to https://github.com/FreeCAD/FreeCAD/pull/20069
FC Forum Discussion:-
https://forum.freecad.org/viewtopic.php?p=814274#p814274
ArchSketch Support, PropertySet, and Refactoring to enable more complex Stairs shape.
* [ArchStairs] ArchSketch Support and Refactoring Phase 2 - Typo fix
* [ArchStairs] ArchSketch Support and Refactoring Phase 2 - Clean up Tab
If a window is a variant Link there will be a hidden source object in the document. That hidden object shares properties with the visible Link object. The Hosts property may be one of them, yet the hidden object should never be hosted.
Forum topics:
https://forum.freecad.org/viewtopic.php?p=817743#p817743 (sample file)
https://forum.freecad.org/viewtopic.php?t=96115 (code discussion)
To test the code:
1. Open the mentioned sample file.
2. Change the Hosts property of Window001 to Wall.
3. Recompute.
Improvement to User Interactive Experience:
- Now with the stock BIM Window Interactive Tool and SketchArch-addon, the required SketchArch parametric placement information of an Arch Object (Window currently) are automatically completed, no more manual input is required.
FreeCAD Forum Discussion:
- https://forum.freecad.org/viewtopic.php?p=822493#p822493
YouTube Demo:
- https://youtu.be/BNZFk03_eGE
* BIM: Improve grid handling for some commands
The updated commands did not handle the 2 grid options ("always", "only during commands") correctly. The proposed code follows the example of BimWall.py and ArchStructure.py where this issue has already been addressed.
* Rebase
* Draft: Cache ContinueMode setting for every tool separately
Currently ContinueMode is done to be held globally, so this patch
changes this to cache it inside `user.cfg` for every cmd separately.
* Draft: Add Chained Mode option for Dimension
Added new option under Dimension, although this is simply porting the
existing logic of "Continue" under "Chained Mode", whereas allowing
existing "Continue" mode to retrigger the command instead of placing
Dimensions in a chain.
Handle %1 placeholder that was appearing in text strings
in the 'Convert to type' dialogue. This was affecting multiple
language files in the translation system.
This change improves the readability and correctness of the displayed text
in the application interface.
The dialog now dynamically shows the correct type (e.g., 'WallType', 'BeamType')
in the user's interface language.
---------
Co-authored-by: _sameer <sameer.mishra@infra.market>
* BIM: fix BIM_WPView command
The BIM_WPView command did not work properly. This was mainly due to a faulty import.
* Updated to avoid a linter warning
Fixes#20723.
The clearAll method resets the column widths of the sheet. The code now stores the old widths and restores them after calling the method.
The old problem that the method would remove the custom property no longer occurs so that code was removed.