Add an option to edit dimension immediately after adding.
This commit is contained in:
parent
58f23aa061
commit
dcdfdec564
@ -42,6 +42,8 @@ New constraint features:
|
||||
constraints on line segments.
|
||||
* Automatic creation of constraints no longer happens if the constraint
|
||||
would have been redundant with other ones.
|
||||
* New option to open the constraint editor for newly created constraints
|
||||
with a value.
|
||||
|
||||
New export/import features:
|
||||
* Three.js: allow configuring projection for exported model, and initially
|
||||
|
@ -102,6 +102,11 @@ void TextWindow::ScreenChangeTurntableNav(int link, uint32_t v) {
|
||||
}
|
||||
}
|
||||
|
||||
void TextWindow::ScreenChangeImmediatelyEditDimension(int link, uint32_t v) {
|
||||
SS.immediatelyEditDimension = !SS.immediatelyEditDimension;
|
||||
SS.GW.Invalidate(/*clearPersistent=*/true);
|
||||
}
|
||||
|
||||
void TextWindow::ScreenChangeShowContourAreas(int link, uint32_t v) {
|
||||
SS.showContourAreas = !SS.showContourAreas;
|
||||
SS.GW.Invalidate();
|
||||
@ -342,6 +347,9 @@ void TextWindow::ShowConfiguration() {
|
||||
SS.automaticLineConstraints ? CHECK_TRUE : CHECK_FALSE);
|
||||
Printf(false, " %Fd%f%Ll%s use turntable mouse navigation%E", &ScreenChangeTurntableNav,
|
||||
SS.turntableNav ? CHECK_TRUE : CHECK_FALSE);
|
||||
Printf(false, " %Fd%f%Ll%s edit newly added dimensions%E",
|
||||
&ScreenChangeImmediatelyEditDimension,
|
||||
SS.immediatelyEditDimension ? CHECK_TRUE : CHECK_FALSE);
|
||||
Printf(false, "");
|
||||
Printf(false, "%Ft autosave interval (in minutes)%E");
|
||||
Printf(false, "%Ba %d %Fl%Ll%f[change]%E",
|
||||
|
@ -196,6 +196,9 @@ void Constraint::MenuConstrain(Command id) {
|
||||
c.valA = 0;
|
||||
c.ModifyToSatisfy();
|
||||
AddConstraint(&c);
|
||||
if (SS.immediatelyEditDimension) {
|
||||
SS.GW.EditConstraint(c.h);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -607,6 +610,9 @@ void Constraint::MenuConstrain(Command id) {
|
||||
|
||||
c.ModifyToSatisfy();
|
||||
AddConstraint(&c);
|
||||
if (SS.immediatelyEditDimension) {
|
||||
SS.GW.EditConstraint(c.h);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1339,12 +1339,8 @@ void GraphicsWindow::MouseLeftUp(double mx, double my, bool shiftDown, bool ctrl
|
||||
}
|
||||
}
|
||||
|
||||
void GraphicsWindow::MouseLeftDoubleClick(double mx, double my) {
|
||||
if(window->IsEditorVisible()) return;
|
||||
SS.TW.HideEditControl();
|
||||
|
||||
if(hover.constraint.v) {
|
||||
constraintBeingEdited = hover.constraint;
|
||||
void GraphicsWindow::EditConstraint(hConstraint constraint) {
|
||||
constraintBeingEdited = constraint;
|
||||
ClearSuper();
|
||||
|
||||
Constraint *c = SK.GetConstraint(constraintBeingEdited);
|
||||
@ -1407,6 +1403,14 @@ void GraphicsWindow::MouseLeftDoubleClick(double mx, double my) {
|
||||
fontHeight, editMinWidth,
|
||||
/*isMonospace=*/false, editValue);
|
||||
}
|
||||
|
||||
void GraphicsWindow::MouseLeftDoubleClick(double mx, double my) {
|
||||
if(window->IsEditorVisible()) return;
|
||||
SS.TW.HideEditControl();
|
||||
|
||||
if(hover.constraint.v) {
|
||||
EditConstraint(hover.constraint);
|
||||
}
|
||||
}
|
||||
|
||||
void GraphicsWindow::EditControlDone(const std::string &s) {
|
||||
|
@ -72,6 +72,8 @@ void SolveSpaceUI::Init() {
|
||||
drawBackFaces = settings->ThawBool("DrawBackFaces", true);
|
||||
// Use turntable mouse navigation
|
||||
turntableNav = settings->ThawBool("TurntableNav", false);
|
||||
// Immediately edit dimension
|
||||
immediatelyEditDimension = settings->ThawBool("ImmediatelyEditDimension", false);
|
||||
// Check that contours are closed and not self-intersecting
|
||||
checkClosedContour = settings->ThawBool("CheckClosedContour", true);
|
||||
// Enable automatic constrains for lines
|
||||
@ -251,6 +253,8 @@ void SolveSpaceUI::Exit() {
|
||||
settings->FreezeBool("CheckClosedContour", checkClosedContour);
|
||||
// Use turntable mouse navigation
|
||||
settings->FreezeBool("TurntableNav", turntableNav);
|
||||
// Immediately edit dimensions
|
||||
settings->FreezeBool("ImmediatelyEditDimension", immediatelyEditDimension);
|
||||
// Enable automatic constrains for lines
|
||||
settings->FreezeBool("AutomaticLineConstraints", automaticLineConstraints);
|
||||
// Export shaded triangles in a 2d view
|
||||
|
@ -587,6 +587,7 @@ public:
|
||||
bool showContourAreas;
|
||||
bool checkClosedContour;
|
||||
bool turntableNav;
|
||||
bool immediatelyEditDimension;
|
||||
bool automaticLineConstraints;
|
||||
bool showToolbar;
|
||||
Platform::Path screenshotFile;
|
||||
|
2
src/ui.h
2
src/ui.h
@ -430,6 +430,7 @@ public:
|
||||
static void ScreenChangeShowContourAreas(int link, uint32_t v);
|
||||
static void ScreenChangeCheckClosedContour(int link, uint32_t v);
|
||||
static void ScreenChangeTurntableNav(int link, uint32_t v);
|
||||
static void ScreenChangeImmediatelyEditDimension(int link, uint32_t v);
|
||||
static void ScreenChangeAutomaticLineConstraints(int link, uint32_t v);
|
||||
static void ScreenChangePwlCurves(int link, uint32_t v);
|
||||
static void ScreenChangeCanvasSizeAuto(int link, uint32_t v);
|
||||
@ -690,6 +691,7 @@ public:
|
||||
void RemoveConstraintsForPointBeingDeleted(hEntity hpt);
|
||||
void FixConstraintsForRequestBeingDeleted(hRequest hr);
|
||||
void FixConstraintsForPointBeingDeleted(hEntity hpt);
|
||||
void EditConstraint(hConstraint constraint);
|
||||
|
||||
// A selected entity.
|
||||
class Selection {
|
||||
|
Loading…
Reference in New Issue
Block a user