Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code
This commit is contained in:
commit
ea9bc3a9f9
|
@ -86,7 +86,7 @@ class _CommandSectionPlane:
|
|||
FreeCAD.ActiveDocument.openTransaction(translate("Arch","Create Section Plane"))
|
||||
FreeCADGui.doCommand("import Arch")
|
||||
FreeCADGui.doCommand("section = Arch.makeSectionPlane("+ss+")")
|
||||
FreeCADGui.doCommand("Arch.makeSectionView(section)")
|
||||
#FreeCADGui.doCommand("Arch.makeSectionView(section)")
|
||||
FreeCAD.ActiveDocument.commitTransaction()
|
||||
FreeCAD.ActiveDocument.recompute()
|
||||
|
||||
|
|
|
@ -2815,6 +2815,7 @@ class _ViewProviderDraft:
|
|||
self.texture = None
|
||||
self.texcoords = None
|
||||
self.Object = vobj.Object
|
||||
self.onChanged(vobj,"Pattern")
|
||||
return
|
||||
|
||||
def updateData(self, obj, prop):
|
||||
|
@ -2842,35 +2843,38 @@ class _ViewProviderDraft:
|
|||
if hasattr(vobj,"Pattern"):
|
||||
if str(vobj.Pattern) in svgpatterns().keys():
|
||||
path = svgpatterns()[vobj.Pattern][1]
|
||||
if path:
|
||||
r = vobj.RootNode.getChild(2).getChild(0).getChild(2)
|
||||
i = QtCore.QFileInfo(path)
|
||||
if self.texture:
|
||||
r.removeChild(self.texture)
|
||||
self.texture = None
|
||||
if self.texcoords:
|
||||
r.removeChild(self.texcoords)
|
||||
self.texcoords = None
|
||||
if i.exists():
|
||||
size = None
|
||||
if ".SVG" in path.upper():
|
||||
size = getParam("HatchPatternResolution",128)
|
||||
if not size:
|
||||
size = 128
|
||||
im = loadTexture(path, size)
|
||||
if im:
|
||||
self.texture = coin.SoTexture2()
|
||||
self.texture.image = im
|
||||
r.insertChild(self.texture,1)
|
||||
if size:
|
||||
s =1
|
||||
if hasattr(vobj,"PatternSize"):
|
||||
if vobj.PatternSize:
|
||||
s = vobj.PatternSize
|
||||
self.texcoords = coin.SoTextureCoordinatePlane()
|
||||
self.texcoords.directionS.setValue(s,0,0)
|
||||
self.texcoords.directionT.setValue(0,s,0)
|
||||
r.insertChild(self.texcoords,2)
|
||||
if path and vobj.RootNode:
|
||||
if vobj.RootNode.getChildren().getLength() > 2:
|
||||
if vobj.RootNode.getChild(2).getChildren().getLength() > 0:
|
||||
if vobj.RootNode.getChild(2).getChild(0).getChildren().getLength() > 2:
|
||||
r = vobj.RootNode.getChild(2).getChild(0).getChild(2)
|
||||
i = QtCore.QFileInfo(path)
|
||||
if self.texture:
|
||||
r.removeChild(self.texture)
|
||||
self.texture = None
|
||||
if self.texcoords:
|
||||
r.removeChild(self.texcoords)
|
||||
self.texcoords = None
|
||||
if i.exists():
|
||||
size = None
|
||||
if ".SVG" in path.upper():
|
||||
size = getParam("HatchPatternResolution",128)
|
||||
if not size:
|
||||
size = 128
|
||||
im = loadTexture(path, size)
|
||||
if im:
|
||||
self.texture = coin.SoTexture2()
|
||||
self.texture.image = im
|
||||
r.insertChild(self.texture,1)
|
||||
if size:
|
||||
s =1
|
||||
if hasattr(vobj,"PatternSize"):
|
||||
if vobj.PatternSize:
|
||||
s = vobj.PatternSize
|
||||
self.texcoords = coin.SoTextureCoordinatePlane()
|
||||
self.texcoords.directionS.setValue(s,0,0)
|
||||
self.texcoords.directionT.setValue(0,s,0)
|
||||
r.insertChild(self.texcoords,2)
|
||||
elif prop == "PatternSize":
|
||||
if hasattr(self,"texcoords"):
|
||||
if self.texcoords:
|
||||
|
|
|
@ -519,10 +519,10 @@ class SpreadsheetController:
|
|||
elif obj.FilterType == "Object Name":
|
||||
for o in baseset:
|
||||
if obj.Filter:
|
||||
if obj.Filter in obl.Label:
|
||||
result.append(obj)
|
||||
if obj.Filter in o.Label:
|
||||
result.append(o)
|
||||
else:
|
||||
result.append(obj)
|
||||
result.append(o)
|
||||
return result
|
||||
|
||||
def getCells(self,obj,spreadsheet):
|
||||
|
@ -531,7 +531,7 @@ class SpreadsheetController:
|
|||
if obj.BaseCell:
|
||||
if obj.DataType == "Count":
|
||||
return obj.BaseCell
|
||||
for i in range(len(self.getDataSet())):
|
||||
for i in range(len(self.getDataSet(obj))):
|
||||
# get the correct cell key
|
||||
c,r = spreadsheet.Proxy.splitKey(obj.BaseCell)
|
||||
if obj.Direction == "Horizontal":
|
||||
|
@ -546,7 +546,7 @@ class SpreadsheetController:
|
|||
def setCells(self,obj,spreadsheet):
|
||||
"Fills the controlled cells of the given spreadsheet"
|
||||
if obj.BaseCell:
|
||||
dataset = self.getDataSet()
|
||||
dataset = self.getDataSet(obj)
|
||||
if obj.DataType == "Count":
|
||||
if spreadsheet.Proxy.isKey(obj.BaseCell):
|
||||
try:
|
||||
|
@ -570,6 +570,7 @@ class SpreadsheetController:
|
|||
args = obj.Data.split(".")
|
||||
value = dataset[i]
|
||||
for arg in args:
|
||||
print arg
|
||||
if hasattr(value,arg):
|
||||
value = getattr(value,arg)
|
||||
try:
|
||||
|
@ -660,7 +661,8 @@ class SpreadsheetView(QtGui.QWidget):
|
|||
if cell in controlled:
|
||||
brush = QtGui.QBrush(QtGui.QColor(255, 0, 0))
|
||||
brush.setStyle(QtCore.Qt.Dense6Pattern)
|
||||
self.table.item(r,c).setBackground(brush)
|
||||
if self.table.item(r,c):
|
||||
self.table.item(r,c).setBackground(brush)
|
||||
|
||||
def changeCell(self,r,c,value=None):
|
||||
"changes the contens of a cell"
|
||||
|
|
|
@ -156,11 +156,11 @@ page = """
|
|||
|
||||
function load() {
|
||||
ddiv = document.getElementById("news");
|
||||
ddiv.innerHTML = "Fetching data from the web...";
|
||||
ddiv.innerHTML = "Connecting...";
|
||||
var tobj=new JSONscriptRequest('http://pipes.yahoo.com/pipes/pipe.run?_id=da8b612e97a6bb4588b1ce27db30efd9&_render=json&_callback=showTweets');
|
||||
tobj.buildScriptTag(); // Build the script tag
|
||||
tobj.addScriptTag(); // Execute (add) the script tag
|
||||
ddiv.innerHTML = "Done fetching";
|
||||
ddiv.innerHTML = "Downloading latest news...";
|
||||
}
|
||||
|
||||
function stripTags(text) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user