fix: fix a wheel enable bug when measuring

This commit is contained in:
kradchen
2025-07-07 10:14:48 +08:00
parent f2b6697333
commit d726b54ce9
5 changed files with 13 additions and 7 deletions

View File

@@ -12,6 +12,7 @@ int FontSizeHelper::desktop_width = 1080;
bool AnnoHelper::privacyOn = false;
bool AnnoHelper::annotOn = true;
bool MeasureHelper::measuring = false;
int MeasureHelper::measureType = 0;

View File

@@ -210,7 +210,7 @@ class MeasureHelper
{
public:
static bool measureOn;
static bool measuring;
static int getMeasureType(){
return measureType;
}

View File

@@ -1,5 +1,14 @@
#include "Measure.h"
#include "Common/QGlobals.h"
bool Measure::Hidden = false;
void Measure::SetPlacing(bool p)
{
if (Hidden) {
Hidden = false;
}
this->Placing = p;
MeasureHelper::measuring = Placing;
}

View File

@@ -39,12 +39,7 @@ public:
return this->Placing;
}
void SetPlacing(bool p) {
if (Hidden) {
Hidden = false;
}
this->Placing = p;
}
void SetPlacing(bool p);
void SetMeasureID(const QString &Id) {
id = Id;

View File

@@ -274,6 +274,7 @@ void DicomImageView::clicked() {
//Widget event----------------------------------------------------------------
void DicomImageView::wheelEvent(QWheelEvent *event) {
if (hasSeries()) {
if (MeasureHelper::measuring) return;
int _Slice = mImageViewer->GetSlice();
int _MinSlice = mImageViewer->GetSliceMin();
int _MaxSlice = mImageViewer->GetSliceMax();