Skip to content

Commit ab9c9cb

Browse files
committed
Update toolbox.cpp
1 parent b2c0730 commit ab9c9cb

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

src/app/GUI/toolbox.cpp

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@ void MainWindow::setupToolBoxMain()
297297
void MainWindow::setupToolBoxNodes()
298298
{
299299
mToolBoxGroupNodes = new QActionGroup(this);
300-
mToolBoxGroupNodes->addAction(mToolBoxMain->addSeparator());
301300

302301
// nodeConnect
303302
mActionConnectPointsAct = new QAction(QIcon::fromTheme("nodeConnect"),
@@ -408,8 +407,8 @@ void MainWindow::setupToolBoxNodes()
408407
Document::sInstance->actionFinished();
409408
});
410409

411-
mToolBoxMain->addActions(mToolBoxGroupNodes->actions());
412-
mNodeVisibilityAct = mToolBoxMain->addWidget(mNodeVisibility);
410+
mViewerRightToolBar->addActions(mToolBoxGroupNodes->actions());
411+
mNodeVisibilityAct = mViewerRightToolBar->addWidget(mNodeVisibility);
413412

414413
setEnableToolBoxNodes(false);
415414
}
@@ -460,7 +459,7 @@ void MainWindow::setupToolBoxDraw()
460459
mDrawPathSmooth->setMinimumSize({size, size});
461460
});
462461

463-
connect(mToolBoxMain, &QToolBar::orientationChanged,
462+
connect(mViewerRightToolBar, &QToolBar::orientationChanged,
464463
this, [this](Qt::Orientation orientation) {
465464
const auto policyH = orientation == Qt::Vertical ?
466465
QSizePolicy::MinimumExpanding :
@@ -474,33 +473,31 @@ void MainWindow::setupToolBoxDraw()
474473

475474
const auto label1 = new VLabel(QString("%1 ").arg(tr("Max Error")),
476475
this,
477-
mToolBoxMain->orientation());
476+
mViewerRightToolBar->orientation());
478477
const auto label2 = new VLabel(QString("%1 ").arg(tr("Smooth")),
479478
this,
480-
mToolBoxMain->orientation());
479+
mViewerRightToolBar->orientation());
481480

482-
connect(mToolBoxMain, &QToolBar::orientationChanged,
481+
connect(mViewerRightToolBar, &QToolBar::orientationChanged,
483482
this, [label1, label2](Qt::Orientation orientation){
484483
label1->setOrientation(orientation);
485484
label2->setOrientation(orientation);
486485
});
487486

488-
mToolBoxDrawActSep = mToolBoxMain->addSeparator();
489-
490-
mToolBoxDrawActIcon1 = mToolBoxMain->addAction(QIcon::fromTheme("drawPath"),
491-
QString());
487+
mToolBoxDrawActIcon1 = mViewerRightToolBar->addAction(QIcon::fromTheme("drawPath"),
488+
QString());
492489
mToolBoxDrawActIcon1->setDisabled(true);
493490

494-
mToolBoxDrawActLabel1 = mToolBoxMain->addWidget(label1);
495-
mToolBoxDrawActMaxError = mToolBoxMain->addWidget(mDrawPathMaxError);
491+
mToolBoxDrawActLabel1 = mViewerRightToolBar->addWidget(label1);
492+
mToolBoxDrawActMaxError = mViewerRightToolBar->addWidget(mDrawPathMaxError);
496493

497-
mToolBoxDrawActIcon2 = mToolBoxMain->addAction(QIcon::fromTheme("drawPath"),
498-
QString());
494+
mToolBoxDrawActIcon2 = mViewerRightToolBar->addAction(QIcon::fromTheme("drawPath"),
495+
QString());
499496
mToolBoxDrawActIcon2->setDisabled(true);
500497

501-
mToolBoxDrawActLabel2 = mToolBoxMain->addWidget(label2);
502-
mToolBoxDrawActSmooth = mToolBoxMain->addWidget(mDrawPathSmooth);
503-
mToolBoxMain->addAction(mDrawPathAuto);
498+
mToolBoxDrawActLabel2 = mViewerRightToolBar->addWidget(label2);
499+
mToolBoxDrawActSmooth = mViewerRightToolBar->addWidget(mDrawPathSmooth);
500+
mViewerRightToolBar->addAction(mDrawPathAuto);
504501

505502
setEnableToolBoxDraw(false);
506503
}

0 commit comments

Comments
 (0)