Fix MPR change button.
This commit is contained in:
@@ -426,6 +426,9 @@ void DefaultToolBar::initMPRButton(){
|
||||
auto actionCoronal = m->addAction(tr("Coronal"));
|
||||
auto actionSagittal =m->addAction(tr("Sagittal"));
|
||||
auto actionAxial = m->addAction(tr("Axial"));
|
||||
mMPRActions[0] = actionCoronal;
|
||||
mMPRActions[1] = actionSagittal;
|
||||
mMPRActions[2] = actionAxial;
|
||||
actionCoronal->setCheckable(true);
|
||||
actionSagittal->setCheckable(true);
|
||||
actionAxial->setCheckable(true);
|
||||
@@ -435,7 +438,7 @@ void DefaultToolBar::initMPRButton(){
|
||||
});
|
||||
connect(group, &QActionGroup::triggered, this, [=](QAction* action) {
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
if (m->actions()[i]==action) {
|
||||
if (mMPRActions[i]==action) {
|
||||
emit changeReconPlane(i);
|
||||
return;
|
||||
}
|
||||
@@ -469,13 +472,13 @@ void DefaultToolBar::updateNeedCheckFunctionButtons(ViewFunctionState state)
|
||||
if (state.canMPR!=-1){
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
if (i==state.canMPR){
|
||||
mBtnMPR->menu()->actions()[i]->setEnabled(false);
|
||||
mMPRActions[i]->setEnabled(false);
|
||||
}
|
||||
else{
|
||||
mBtnMPR->menu()->actions()[i]->setEnabled(true);
|
||||
mMPRActions[i]->setEnabled(true);
|
||||
}
|
||||
}
|
||||
mBtnMPR->menu()->actions()[state.canMPR]->setChecked(true);
|
||||
mMPRActions[state.canMPR]->setChecked(true);
|
||||
}
|
||||
mBtnFusion->setEnabled(state.canFusion);
|
||||
// SyncHelper::setSyncState((SyncState)state.canSync);
|
||||
|
||||
@@ -102,6 +102,7 @@ private:
|
||||
QAction *mActionHideMeasure;
|
||||
QAction *mActionHidePatData;
|
||||
QAction* mSyncActions[3]={nullptr,nullptr,nullptr};
|
||||
QAction* mMPRActions[3]={nullptr,nullptr,nullptr};
|
||||
ImageViewManager* mImageViewManager;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user