Core: Fix 'Expression' and 'Vector' editor outhanging the screen (#22426)

* Core: Fix Expression dialog outhanging main window

Expression dialog is now fully shown inside main window, even if opened from model panel positioned on right side. If Model panel is outside main window, dialog is opened over this panel.

* Core: Fix Vectors dialog outhanging main window

Vectors dialog is now fully shown inside main window, even if opened from model panel positioned on right side. If Model panel is outside main window, dialog is opened over this panel.

* Core: Simplify 'adjustDialogPosition()'

Change suggested and authored by @hyarion
This commit is contained in:
Krzysztof
2025-08-07 19:22:28 +02:00
committed by GitHub
parent b63110b9b5
commit f5a5fb6411
5 changed files with 65 additions and 0 deletions

View File

@@ -40,6 +40,7 @@
#include "Command.h"
#include "Dialogs/DlgExpressionInput.h"
#include "QuantitySpinBox_p.h"
#include "Widgets.h"
using namespace Gui;
@@ -206,6 +207,7 @@ void ExpressionSpinBox::openFormulaDialog()
QPoint pos = spinbox->mapToGlobal(QPoint(0,0));
box->move(pos-box->expressionPosition());
box->setExpressionInputSize(spinbox->width(), spinbox->height());
Gui::adjustDialogPosition(box);
}
bool ExpressionSpinBox::handleKeyEvent(const QString& text)