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