exception on edit mode for windows

A forum dedicated to the Arch module development
User avatar
bernd
Posts: 5964
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

exception on edit mode for windows

Postby bernd » Wed Sep 12, 2018 9:49 am

run the code to create a window:

Code: Select all

import math,FreeCAD,Arch,WorkingPlane
m = FreeCAD.Matrix()
m.rotateX(math.pi/2)
pl = FreeCAD.Placement(m)
pl.Base = FreeCAD.Vector(0.0,0.0,0.0)
win = Arch.makeWindowPreset("Open 2-pane",width=1000.0,height=1000.0,h1=10.0,h2=10.0,h3=10.0,w1=200.0,w2=100.0,o1=0,o2=100.0,placement=pl)
double click on the window in tree view --> an exception is raised

Code: Select all

Traceback (most recent call last):
  File "/usr/local/Mod/Arch/ArchWindow.py", line 1385, in setEdit
    taskd = _ArchWindowTaskPanel()
  File "/usr/local/Mod/Arch/ArchWindow.py", line 1470, in __init__
    self.basepanel = ArchComponent.ComponentTaskPanel()
  File "/usr/local/Mod/Arch/ArchComponent.py", line 1046, in __init__
    self.form.ButtonCode.hide()
<type 'exceptions.AttributeError'>: 'PySide.QtGui.QWidget' object has no attribute 'ButtonCode'
Traceback (most recent call last):
  File "/usr/local/Mod/Arch/ArchWindow.py", line 1398, in unsetEdit
    vobj.DisplayMode = self.sets[0]
<type 'exceptions.AttributeError'>: _ViewProviderWindow instance has no attribute 'sets'

OS: Debian GNU/Linux 9.5 (stretch)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14708 (Git)
Build type: Debug
Branch: master
Hash: 8f3a53c24c43e9eceb5800f50921f41acd9d1d83
Python version: 2.7.13
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
Locale: German/Switzerland (de_CH)
User avatar
bernd
Posts: 5964
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: exception on edit mode for windows

Postby bernd » Fri Sep 14, 2018 9:18 pm

it works great in 0.17 :)

OS: Debian GNU/Linux 9.5 (stretch)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13541 (Git)
Build type: Unknown
Branch: releases/FreeCAD-0-17
Hash: 9948ee4f1570df9216862a79705afb367b2c6ffb
Python version: 2.7.13
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
Locale: German/Switzerland (de_CH)


means the bug must have been introduced in 0.18