[TechDraw] Improve readability of ViewProviderBalloon.cpp

This commit is contained in:
Benjamin Bræstrup Sayoc
2022-07-12 17:53:27 +02:00
committed by WandererFan
parent 23c3cf76be
commit c90fc4fe49

View File

@@ -110,20 +110,18 @@ void ViewProviderBalloon::setupContextMenu(QMenu* menu, QObject* receiver, const
bool ViewProviderBalloon::setEdit(int ModNum)
{
if (ModNum == ViewProvider::Default ) {
if (Gui::Control().activeDialog()) {
return false;
}
// clear the selection (convenience)
Gui::Selection().clearSelection();
auto qgivBalloon(dynamic_cast<QGIViewBalloon*>(getQView()));
if (qgivBalloon) {
Gui::Control().showDialog(new TaskDlgBalloon(qgivBalloon, this));
}
return true;
} else {
if (ModNum != ViewProvider::Default ) {
return ViewProviderDrawingView::setEdit(ModNum);
}
if (Gui::Control().activeDialog()) {
return false;
}
// clear the selection (convenience)
Gui::Selection().clearSelection();
auto qgivBalloon(dynamic_cast<QGIViewBalloon*>(getQView()));
if (qgivBalloon) {
Gui::Control().showDialog(new TaskDlgBalloon(qgivBalloon, this));
}
return true;
}