]> Shamusworld >> Repos - architektonas/blobdiff - src/forms/cadtoolbarmain.cpp
Start of bringing back missing forms/dialogs
[architektonas] / src / forms / cadtoolbarmain.cpp
index b2111e9a1f731fb02979ef6ad09925b9004f0616..3cc4aa22ad80572f456f8c7be436a72626629b89 100644 (file)
@@ -1,5 +1,6 @@
 // cadtoolbarmain.cpp
 //
+// Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // Extensively rewritten and refactored by James L. Hammons
 // (C) 2010 Underground Software
@@ -16,6 +17,8 @@
 #include "cadtoolbar.h"
 #include "qg_actionhandler.h"
 
+#include "createqtactions.h"
+
 CadToolBarMain::CadToolBarMain(QWidget * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
        QWidget(parent, flags)
 {
@@ -25,6 +28,11 @@ CadToolBarMain::CadToolBarMain(QWidget * parent/*= 0*/, Qt::WindowFlags flags/*=
 //#ifndef RS_PROF
 //     ui.bMenuPolyline->hide();
 //#endif
+
+//hm.
+//well, it looks like something else is messing with this...
+//     if (parent)
+//             ((QToolBar *)parent)->addWidget(this);
 }
 
 CadToolBarMain::~CadToolBarMain()
@@ -35,12 +43,12 @@ void CadToolBarMain::setCadToolBar(CadToolBar * tb)
 {
        QG_ActionHandler * ah = NULL;
 
-       if (tb != NULL)
+       if (tb)
                ah = tb->getActionHandler();
        else
                RS_DEBUG->print(RS_Debug::D_ERROR, "QG_CadToolBarMain::setCadToolBar(): No valid toolbar set.");
 
-       if (ah != NULL)
+       if (ah)
        {
                connect(ui.bMenuPoint, SIGNAL(clicked()), ah, SLOT(slotDrawPoint()));
                connect(ui.bMenuLine, SIGNAL(clicked()), tb, SLOT(showToolBarLines()));