Skip to content

Commit

Permalink
Arch: Fixed building label
Browse files Browse the repository at this point in the history
  • Loading branch information
j-wiedemann authored and yorikvanhavre committed Jan 5, 2015
1 parent ab24e9d commit 5657eed
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/Mod/Arch/ArchBuilding.py
@@ -1,7 +1,7 @@
#***************************************************************************
#* *
#* Copyright (c) 2011 *
#* Yorik van Havre <yorik@uncreated.net> *
#* Copyright (c) 2011 *
#* Yorik van Havre <yorik@uncreated.net> *
#* *
#* This program is free software; you can redistribute it and/or modify *
#* it under the terms of the GNU Lesser General Public License (LGPL) *
Expand Down Expand Up @@ -43,6 +43,7 @@ def makeBuilding(objectslist=None,baseobj=None,name=translate("Arch","Building")
_ViewProviderBuilding(obj.ViewObject)
if objectslist:
obj.Group = objectslist
obj.Label = name
return obj

class _CommandBuilding:
Expand All @@ -55,7 +56,7 @@ def GetResources(self):

def IsActive(self):
return not FreeCAD.ActiveDocument is None

def Activated(self):
sel = FreeCADGui.Selection.getSelection()
ok = False
Expand All @@ -81,18 +82,18 @@ def Activated(self):
FreeCADGui.doCommand("Arch.makeBuilding("+ss+")")
FreeCAD.ActiveDocument.commitTransaction()
FreeCAD.ActiveDocument.recompute()

class _Building(ArchFloor._Floor):
"The Building object"
def __init__(self,obj):
ArchFloor._Floor.__init__(self,obj)
self.Type = "Building"
obj.setEditorMode('Height',2)

class _ViewProviderBuilding(ArchFloor._ViewProviderFloor):
"A View Provider for the Building object"
def __init__(self,vobj):
ArchFloor._ViewProviderFloor.__init__(self,vobj)
ArchFloor._ViewProviderFloor.__init__(self,vobj)

def getIcon(self):
import Arch_rc
Expand Down

0 comments on commit 5657eed

Please sign in to comment.