@@ -625,7 +625,7 @@ void FredView::on_actionRun_FreeSpace_2_Open_triggered(bool) {
625625
626626 QString args = QString::fromStdString (cmdline_build_string ());
627627
628- if (!QProcess::startDetached (exePath, args.split (' ' , QString ::SkipEmptyParts))) {
628+ if (!QProcess::startDetached (exePath, args.split (' ' , Qt ::SkipEmptyParts))) {
629629 QMessageBox::warning (this , tr (" Run FreeSpace" ),
630630 tr (" Failed to launch: %1" ).arg (exePath));
631631 }
@@ -1786,13 +1786,16 @@ void FredView::initializePopupMenus() {
17861786 if (fred->cur_waypoint != nullptr ) {
17871787 waypoint_instance = Objects[fred->cur_waypoint ->get_objnum ()].instance ;
17881788 }
1789- _viewport->createWaypointAtScreenPos (_lastContextMenuLocalPos.x (), _lastContextMenuLocalPos.y (), waypoint_instance);
1789+ _viewport->createWaypointAtScreenPos (_lastContextMenuLocalPos.x () * this ->devicePixelRatio (),
1790+ _lastContextMenuLocalPos.y () * this ->devicePixelRatio (),
1791+ waypoint_instance);
17901792 });
17911793 _createSubmenu->addAction (createWaypointAction);
17921794
17931795 auto * createJumpNodeAction = new QAction (tr (" Jump Node" ), _createSubmenu);
17941796 connect (createJumpNodeAction, &QAction::triggered, this , [this ]() {
1795- _viewport->createJumpNodeAtScreenPos (_lastContextMenuLocalPos.x (), _lastContextMenuLocalPos.y ());
1797+ _viewport->createJumpNodeAtScreenPos (_lastContextMenuLocalPos.x () * this ->devicePixelRatio (),
1798+ _lastContextMenuLocalPos.y () * this ->devicePixelRatio ());
17961799 });
17971800 _createSubmenu->addAction (createJumpNodeAction);
17981801
@@ -1870,7 +1873,8 @@ void FredView::populateCreateShipSubmenu() {
18701873 }
18711874 auto * action = new QAction (QString::fromUtf8 (Ship_info[i].name ), _createShipSubmenu);
18721875 connect (action, &QAction::triggered, this , [this , i]() {
1873- _viewport->createShipAtScreenPos (_lastContextMenuLocalPos.x (), _lastContextMenuLocalPos.y (), i);
1876+ _viewport->createShipAtScreenPos (_lastContextMenuLocalPos.x () * this ->devicePixelRatio (),
1877+ _lastContextMenuLocalPos.y () * this ->devicePixelRatio (), i);
18741878 });
18751879 _createShipSubmenu->addAction (action);
18761880 }
@@ -1883,7 +1887,9 @@ void FredView::populateCreatePropSubmenu() {
18831887 }
18841888 auto * action = new QAction (QString::fromStdString (Prop_info[i].name ), _createPropSubmenu);
18851889 connect (action, &QAction::triggered, this , [this , i]() {
1886- _viewport->createPropAtScreenPos (_lastContextMenuLocalPos.x (), _lastContextMenuLocalPos.y (), i);
1890+ _viewport->createPropAtScreenPos (_lastContextMenuLocalPos.x () * this ->devicePixelRatio (),
1891+ _lastContextMenuLocalPos.y () * this ->devicePixelRatio (),
1892+ i);
18871893 });
18881894 _createPropSubmenu->addAction (action);
18891895 }
@@ -2846,6 +2852,5 @@ void FredView::on_actionWaypointPathGenerator_triggered(bool) {
28462852 dialog->setAttribute (Qt::WA_DeleteOnClose);
28472853 dialog->show ();
28482854}
2849-
28502855} // namespace fred
28512856} // namespace fso
0 commit comments