Reset layout when reload data.
This commit is contained in:
@@ -31,6 +31,8 @@ public:
|
||||
void replaceViewWithSerie(const std::string& unique_info,
|
||||
DicomImageView* curV = nullptr);
|
||||
|
||||
void resetToOneView();
|
||||
|
||||
//fusion
|
||||
void toggleViewWithFusion();
|
||||
void removeCurrentViewWithFusion();
|
||||
|
||||
@@ -1006,7 +1006,8 @@ void QDicomViewer::openAndDrawDICOM(const std::string& dicomName, SeriesOpenMode
|
||||
|
||||
displayThumbnailBar(true);
|
||||
|
||||
|
||||
//必须首先重置成1个窗口的布局
|
||||
ui->viewContainer->resetToOneView();
|
||||
DicomLoader *helper = DicomLoader::GetInstance();
|
||||
helper->reset();
|
||||
//load image and tag
|
||||
|
||||
@@ -396,6 +396,18 @@ void ViewContainerWidget::Slot_ThumbnailClickEvent(thumbnailImage* tb)
|
||||
setCurrentView(view);
|
||||
}
|
||||
|
||||
void ViewContainerWidget::resetToOneView() {
|
||||
Slot_SetViewLayout(1,1);
|
||||
for (int i = 1; i < view_list_.size(); ++i) {
|
||||
delete view_list_[i];
|
||||
}
|
||||
DicomImageView* v = view_list_[0];
|
||||
view_list_.clear();
|
||||
view_list_.push_back(v);
|
||||
|
||||
setCurrentView(v);
|
||||
}
|
||||
|
||||
void ViewContainerWidget::replaceViewWithSerie(const std::string& uniqueid, DicomImageView* curV)
|
||||
{
|
||||
if (!curV)
|
||||
@@ -472,3 +484,4 @@ bool ViewContainerWidget::checkFusionStatus(DicomImageView *base, DicomImageView
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user