[TD]fix fail on missing base view (#7856)
This commit is contained in:
@@ -190,8 +190,10 @@ void TaskProjGroup::viewToggled(bool toggle)
|
||||
multiView->getNameInDocument(), viewNameCStr);
|
||||
changed = true;
|
||||
} else if ( !toggle && multiView->hasProjection( viewNameCStr ) ) {
|
||||
multiView->removeProjection( viewNameCStr );
|
||||
changed = true;
|
||||
if (multiView->canDelete(viewNameCStr)) {
|
||||
multiView->removeProjection( viewNameCStr );
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
if (changed) {
|
||||
if (multiView->ScaleType.isValue("Automatic")) {
|
||||
@@ -473,6 +475,9 @@ void TaskProjGroup::setupViewCheckboxes(bool addConnections)
|
||||
const char *viewStr = viewChkIndexToCStr(i);
|
||||
if (viewStr && multiView->hasProjection(viewStr)) {
|
||||
box->setCheckState(Qt::Checked);
|
||||
if (!multiView->canDelete(viewStr)) {
|
||||
box->setEnabled(false);
|
||||
}
|
||||
} else {
|
||||
box->setCheckState(Qt::Unchecked);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user