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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user