TechDraw - Balloon updates - review based changes

This commit is contained in:
Tomas Pavlicek
2021-10-08 16:12:01 +02:00
parent b93d049f8e
commit 52dcfc64c3
2 changed files with 26 additions and 17 deletions

View File

@@ -87,16 +87,17 @@
#include <Mod/TechDraw/Gui/QGVPage.h>
#include "DrawGuiUtil.h"
#include "PreferencesGui.h"
#include "MDIViewPage.h"
#include "PreferencesGui.h"
#include "QGIViewPart.h"
#include "Rez.h"
#include "TaskProjGroup.h"
#include "TaskSectionView.h"
#include "TaskActiveView.h"
#include "TaskDetail.h"
#include "ViewProviderPage.h"
#include "ViewProviderViewPart.h"
#include "QGIViewPart.h"
#include "Rez.h"
class Vertex;
using namespace TechDrawGui;
@@ -807,7 +808,15 @@ bool _checkDrawViewPartBalloon(Gui::Command* cmd) {
bool _checkDirectPlacement(const QGIViewPart *viewPart, const std::vector<std::string> &subNames, QPointF &placement)
{
// Let's see, if we can help speed up the placement of the balloon:
// As of now we support:
// Single selected vertex: place the ballon tip end here
// Single selected edge: place the ballon tip at its midpoint (suggested placement for e.g. chamfer dimensions)
//
// Single selected faces are currently not supported, but maybe we could in this case use the center of mass?
if (subNames.size() != 1) {
// If nothing or more than one subjects are selected, let the user decide, where to place the balloon
return false;
}