Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code

This commit is contained in:
wmayer 2014-03-08 17:59:51 +01:00
commit c535b2d330
2 changed files with 27 additions and 9 deletions

View File

@ -3812,12 +3812,12 @@ class WireToBSpline(Modifier):
self.Points = self.obj.Points
self.closed = self.obj.Closed
n = None
if (Draft.getType(self.selection[0]) == 'Wire'):
if (Draft.getType(self.obj) == 'Wire'):
n = Draft.makeBSpline(self.Points, self.closed, self.pl)
elif (Draft.getType(self.selection[0]) == 'BSpline'):
elif (Draft.getType(self.obj) == 'BSpline'):
n = Draft.makeWire(self.Points, self.closed, self.pl)
if n:
Draft.formatObject(n,self.selection[0])
Draft.formatObject(n,self.obj)
else:
self.finish()

View File

@ -207,6 +207,19 @@ page = """
}
}
function scroller() {
desc = document.getElementById("description");
base = document.getElementById("column").offsetTop;
scro = window.scrollY;
if (scro > base) {
desc.className = "stick";
} else {
desc.className = "";
}
}
document.onmousemove=scroller;
</script>
<style type="text/css">
@ -282,16 +295,15 @@ page = """
}
#description {
background: #windowcolor;
background: #222222;
border-radius: 5px;
padding: 8px;
color: #windowtextcolor;
color: #bdbdbd;
float: right;
width: 316px;
margin-right: 10px;
height: 100%;
position: fixed;
right: 10px;
height: 100%;
position: relative;
}
#description img {
@ -303,6 +315,12 @@ page = """
width: 300px !important;
}
.stick {
position: fixed !important;
top: 0px;
right: 18px !important;
}
</style>
</head>
@ -600,4 +618,4 @@ def handle():
def exportTestFile():
f = open(os.path.expanduser("~")+os.sep+"freecad-startpage.html","wb")
f.write(handle())
f.close()
f.close()