Fix connect slots repeat.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
#include "view/dicomimageview.h"
|
#include "view/dicomimageview.h"
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include "view/thumbnailImage.h"
|
#include "view/thumbnailImage.h"
|
||||||
@@ -358,9 +358,12 @@ void DicomImageView::setDicomImageView(SeriesImageSet *series)
|
|||||||
LoadSeries(series);
|
LoadSeries(series);
|
||||||
//whenver change instance,set scroll value to zero
|
//whenver change instance,set scroll value to zero
|
||||||
initScrollbar();
|
initScrollbar();
|
||||||
|
if (!slotInited){
|
||||||
|
connect(_scrollBar, &QScrollBar::valueChanged, this, &DicomImageView::Slot_scrollValueChanged);
|
||||||
|
connect(this, &DicomImageView::Signal_Transformation, this, &DicomImageView::Slot_Transformation);
|
||||||
|
slotInited = true;
|
||||||
|
}
|
||||||
|
|
||||||
connect(_scrollBar, &QScrollBar::valueChanged, this, &DicomImageView::Slot_scrollValueChanged);
|
|
||||||
connect(this, &DicomImageView::Signal_Transformation, this, &DicomImageView::Slot_Transformation);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DicomImageView::HasSeries()
|
bool DicomImageView::HasSeries()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
#include <QOpenGLWidget>
|
#include <QOpenGLWidget>
|
||||||
#include "ClickableScrollBar.h"
|
#include "ClickableScrollBar.h"
|
||||||
@@ -238,4 +238,5 @@ private:
|
|||||||
bool isCine = false;
|
bool isCine = false;
|
||||||
bool isNegative = false;
|
bool isNegative = false;
|
||||||
bool isOverlay = false;
|
bool isOverlay = false;
|
||||||
|
bool slotInited = false;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user