Remove message
This commit is contained in:
@@ -619,7 +619,6 @@ void Canvas::mousePressEvent(QMouseEvent* event)
|
|||||||
// Вариант 1: Линия → Окружность
|
// Вариант 1: Линия → Окружность
|
||||||
if (Line* line = dynamic_cast<Line*>(first)) {
|
if (Line* line = dynamic_cast<Line*>(first)) {
|
||||||
if (Circle* circle = dynamic_cast<Circle*>(second)) {
|
if (Circle* circle = dynamic_cast<Circle*>(second)) {
|
||||||
message = "Выбрано: Линия → Окружность\nПрименено касание линии к окружности.";
|
|
||||||
sys.addConstraintTangent(*line, *circle, constraints_count++);
|
sys.addConstraintTangent(*line, *circle, constraints_count++);
|
||||||
constraintAdded = true;
|
constraintAdded = true;
|
||||||
}
|
}
|
||||||
@@ -627,7 +626,6 @@ void Canvas::mousePressEvent(QMouseEvent* event)
|
|||||||
// Вариант 2: Окружность → Линия
|
// Вариант 2: Окружность → Линия
|
||||||
else if (Circle* circle = dynamic_cast<Circle*>(first)) {
|
else if (Circle* circle = dynamic_cast<Circle*>(first)) {
|
||||||
if (Line* line = dynamic_cast<Line*>(second)) {
|
if (Line* line = dynamic_cast<Line*>(second)) {
|
||||||
message = "Выбрано: Окружность → Линия\nПрименено касание линии к окружности.";
|
|
||||||
sys.addConstraintTangent(*line, *circle, constraints_count++); // порядок Line, Circle
|
sys.addConstraintTangent(*line, *circle, constraints_count++); // порядок Line, Circle
|
||||||
constraintAdded = true;
|
constraintAdded = true;
|
||||||
}
|
}
|
||||||
@@ -635,7 +633,6 @@ void Canvas::mousePressEvent(QMouseEvent* event)
|
|||||||
// Вариант 3: Окружность → Окружность
|
// Вариант 3: Окружность → Окружность
|
||||||
if (Circle* c1 = dynamic_cast<Circle*>(first)) {
|
if (Circle* c1 = dynamic_cast<Circle*>(first)) {
|
||||||
if (Circle* c2 = dynamic_cast<Circle*>(second)) {
|
if (Circle* c2 = dynamic_cast<Circle*>(second)) {
|
||||||
message = "Выбрано: Окружность → Окружность\nПрименено касание двух окружностей.";
|
|
||||||
sys.addConstraintTangent(*c1, *c2, constraints_count++);
|
sys.addConstraintTangent(*c1, *c2, constraints_count++);
|
||||||
constraintAdded = true;
|
constraintAdded = true;
|
||||||
}
|
}
|
||||||
@@ -651,11 +648,7 @@ void Canvas::mousePressEvent(QMouseEvent* event)
|
|||||||
// Сохраняем информацию об ограничении (для undo и удаления)
|
// Сохраняем информацию об ограничении (для undo и удаления)
|
||||||
auto orderedPair = makeOrderedPair<CurvePair>(first, second);
|
auto orderedPair = makeOrderedPair<CurvePair>(first, second);
|
||||||
tangentPairs.insert(orderedPair);
|
tangentPairs.insert(orderedPair);
|
||||||
|
|
||||||
C_Info[constraints_count - 1] = { Mode::Tangent, orderedPair };
|
C_Info[constraints_count - 1] = { Mode::Tangent, orderedPair };
|
||||||
|
|
||||||
QMessageBox::information(this, "Касание применено", message, QMessageBox::Ok);
|
|
||||||
|
|
||||||
after_constraint = true;
|
after_constraint = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1051,6 +1044,7 @@ void Canvas::clearCanvas()
|
|||||||
VERT_pairs.clear();
|
VERT_pairs.clear();
|
||||||
HORIZ_pairs.clear();
|
HORIZ_pairs.clear();
|
||||||
perpendicularPairs.clear();
|
perpendicularPairs.clear();
|
||||||
|
tangentPairs.clear();
|
||||||
|
|
||||||
// Очистка информации об ограничениях
|
// Очистка информации об ограничениях
|
||||||
C_Info.clear();
|
C_Info.clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user