tbSelect(NULL), tbPolylines(NULL)
{
ui.setupUi(this);
-//hm. here maybe?
+//hm. here maybe? Yesh!
if (parent)
((QToolBar *)parent)->addWidget(this);
}
*/
void CadToolBar::forceNext()
{
- if (currentTb != NULL && currentTb == tbSelect)
+ if (currentTb && currentTb == tbSelect)
tbSelect->runNextAction();
}
actionHandler = ah;
tbMain = new CadToolBarMain(this);
tbMain->setCadToolBar(this);
+ currentTb = tbMain;
tbPoints = new CadToolBarPoints(this);
tbPoints->setCadToolBar(this);
tbSplines->setCadToolBar(this);
tbSplines->hide();
-//#ifdef RS_PROF
tbPolylines = new CadToolBarPolylines(this);
tbPolylines->setCadToolBar(this);
tbPolylines->hide();
-//#endif
tbDim = new CadToolBarDim(this);
tbDim->setCadToolBar(this);
tbSelect = new CadToolBarSelect(this);
tbSelect->setCadToolBar(this);
tbSelect->hide();
-
- //showToolBarMain();
}
void CadToolBar::showToolBar(int id)
case RS2::ToolBarSplines:
newTb = tbSplines;
break;
-//#ifdef RS_PROF
case RS2::ToolBarPolylines:
newTb = tbPolylines;
break;
-//#endif
case RS2::ToolBarCircles:
newTb = tbCircles;
break;
if (currentTb == newTb)
return;
- if (currentTb != NULL)
+ if (currentTb)
currentTb->hide();
currentTb = newTb;
- if (currentTb != NULL)
+ if (currentTb)
currentTb->show();
}