Sketcher: points defined as external geometry,
fix behavior of external geometry cursor,
improve appearance of point creation cursor
This commit is contained in:
@@ -1269,22 +1269,22 @@ static const char *cursor_createpoint[]={
|
||||
"......+.........................",
|
||||
"......+.........................",
|
||||
"......+.........................",
|
||||
"...............+++++++..........",
|
||||
"..............++.....++.........",
|
||||
".............+.........+........",
|
||||
"............++.........++.......",
|
||||
"...........++...........++......",
|
||||
"...........+.............+......",
|
||||
"...........+.............+......",
|
||||
"...........+.............+......",
|
||||
"...........+.............+......",
|
||||
"...........+.............+......",
|
||||
"...........+.............+......",
|
||||
"...........++...........++......",
|
||||
"............++.........++.......",
|
||||
".............+.........+........",
|
||||
"..............++.....++.........",
|
||||
"...............+++++++..........",
|
||||
"................................",
|
||||
"................................",
|
||||
"................................",
|
||||
".................++++...........",
|
||||
"................++++++..........",
|
||||
"...............++++++++.........",
|
||||
"...............++++++++.........",
|
||||
"...............++++++++.........",
|
||||
"...............++++++++.........",
|
||||
"................++++++..........",
|
||||
".................++++...........",
|
||||
"................................",
|
||||
"................................",
|
||||
"................................",
|
||||
"................................",
|
||||
"................................",
|
||||
"................................",
|
||||
"................................",
|
||||
"................................"};
|
||||
@@ -1843,8 +1843,9 @@ namespace SketcherGui {
|
||||
if (!sSubName || sSubName[0] == '\0')
|
||||
return false;
|
||||
std::string element(sSubName);
|
||||
// for the moment we allow only edges
|
||||
if (element.substr(0,4) == "Edge") {
|
||||
// for the moment we allow only edges and vertices
|
||||
if ((element.size() > 4 && element.substr(0,4) == "Edge") ||
|
||||
(element.size() > 6 && element.substr(0,6) == "Vertex")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -1917,7 +1918,8 @@ public:
|
||||
|
||||
virtual void mouseMove(Base::Vector2D onSketchPos)
|
||||
{
|
||||
applyCursor();
|
||||
if (Gui::Selection().getPreselection().pObjectName)
|
||||
applyCursor();
|
||||
}
|
||||
|
||||
virtual bool pressButton(Base::Vector2D onSketchPos)
|
||||
@@ -1935,7 +1937,8 @@ public:
|
||||
{
|
||||
if (msg.Type == Gui::SelectionChanges::AddSelection) {
|
||||
std::string subName(msg.pSubName);
|
||||
if (subName.size() > 4 && subName.substr(0,4) == "Edge") {
|
||||
if ((subName.size() > 4 && subName.substr(0,4) == "Edge") ||
|
||||
(subName.size() > 6 && subName.substr(0,6) == "Vertex")) {
|
||||
try {
|
||||
Gui::Command::openCommand("Add external geometry");
|
||||
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.addExternal(\"%s\",\"%s\")",
|
||||
|
||||
Reference in New Issue
Block a user