[TD] Gui: remove some superfluous nullptr checks

This commit is contained in:
Uwe
2022-07-19 02:49:46 +02:00
parent 003757176c
commit 2e5e4dced8
38 changed files with 154 additions and 160 deletions

View File

@@ -1059,7 +1059,7 @@ void CmdTechDrawExtentGroup::activated(int iMsg)
{
// Base::Console().Message("CMD::ExtentGrp - activated(%d)\n", iMsg);
Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog();
if (dlg != nullptr) {
if (dlg) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Task In Progress"),
QObject::tr("Close active task dialog and try again."));
return;
@@ -1153,7 +1153,7 @@ void CmdTechDrawHorizontalExtentDimension::activated(int iMsg)
Q_UNUSED(iMsg);
Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog();
if (dlg != nullptr) {
if (dlg) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Task In Progress"),
QObject::tr("Close active task dialog and try again."));
return;
@@ -1240,7 +1240,7 @@ void CmdTechDrawVerticalExtentDimension::activated(int iMsg)
Q_UNUSED(iMsg);
Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog();
if (dlg != nullptr) {
if (dlg) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Task In Progress"),
QObject::tr("Close active task dialog and try again."));
return;