relation in toolbar, menu, and keybind

pull/1433/head
Dhruv Gramopadhye 2024-04-06 13:24:59 -07:00 committed by ruevs
parent 1ad0fcdda0
commit ce4712e736
5 changed files with 7 additions and 4 deletions

View File

@ -255,6 +255,7 @@ add_resources(
icons/graphics-window/pointonx.png icons/graphics-window/pointonx.png
icons/graphics-window/point.png icons/graphics-window/point.png
icons/graphics-window/rectangle.png icons/graphics-window/rectangle.png
icons/graphics-window/relation.png
icons/graphics-window/ref.png icons/graphics-window/ref.png
icons/graphics-window/revolve.png icons/graphics-window/revolve.png
icons/graphics-window/same-orientation.png icons/graphics-window/same-orientation.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

View File

@ -28,7 +28,7 @@ std::string Constraint::Label() const {
} }
if(expression != "") { if(expression != "") {
result = expression ; result = expression ;
if(SS.MmPerUnit() != expr_scaling_to_base) { if(SS.MmPerUnit() != expr_scaling_to_base && expr_scaling_to_base != 0) {
result += "*" + std::to_string(expr_scaling_to_base/SS.MmPerUnit()); result += "*" + std::to_string(expr_scaling_to_base/SS.MmPerUnit());
} }
} }

View File

@ -165,7 +165,7 @@ const MenuEntry Menu[] = {
{ 1, N_("Lock Point Where &Dragged"), Command::WHERE_DRAGGED, ']', KN, mCon }, { 1, N_("Lock Point Where &Dragged"), Command::WHERE_DRAGGED, ']', KN, mCon },
{ 1, NULL, Command::NONE, 0, KN, NULL }, { 1, NULL, Command::NONE, 0, KN, NULL },
{ 1, N_("Comment"), Command::COMMENT, ';', KN, mCon }, { 1, N_("Comment"), Command::COMMENT, ';', KN, mCon },
{ 1, N_("Relation"), Command::RELATION, ':', KN, mCon }, { 1, N_("Relation"), Command::RELATION, '/', KN, mCon },
{ 0, N_("&Analyze"), Command::NONE, 0, KN, mAna }, { 0, N_("&Analyze"), Command::NONE, 0, KN, mAna },
{ 1, N_("Measure &Volume"), Command::VOLUME, C|S|'v', KN, mAna }, { 1, N_("Measure &Volume"), Command::VOLUME, C|S|'v', KN, mAna },

View File

@ -62,6 +62,8 @@ static ToolIcon Toolbar[] = {
N_("Other supplementary angle"), {} }, N_("Other supplementary angle"), {} },
{ "ref", Command::REFERENCE, { "ref", Command::REFERENCE,
N_("Toggle reference dimension"), {} }, N_("Toggle reference dimension"), {} },
{ "relation", Command::RELATION,
N_("Constrain variables with equation"), {} },
{ "", Command::NONE, "", {} }, { "", Command::NONE, "", {} },
{ "extrude", Command::GROUP_EXTRUDE, { "extrude", Command::GROUP_EXTRUDE,