]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewPanel.cxx
#3351 creaMaracas Visu Bug New Normal - Refresh ViewerNV
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / ThresholdImageView / ColorLayerImageViewPanel.cxx
index 586ea0db2a72b67589c1392400c44a0fb0d4eab9..b7495217b91066e559d7bcac9c55366a34e42091 100644 (file)
@@ -218,7 +218,7 @@ ColorLayerImageViewPanel::ColorLayerImageViewPanel(wxWindow* parent, int min, in
                sizer                                                   = new wxFlexGridSizer(2);
                _interpolationCheckBox = new wxCheckBox(this, -1, _T("Interpolate") );
                _interpolationCheckBox->SetValue(true);
-               _opacity = new wxSlider(this, wxID_ANY, opacity, 0, 100, wxDefaultPosition, wxSize(2,40), wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
+               _opacity = new wxSlider(this, wxID_ANY, opacity, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
 
                Connect( _interpolationCheckBox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &ColorLayerImageViewPanel::onThresholdInterpolation );
                Connect( _opacity->GetId(), wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction) &ColorLayerImageViewPanel::onChangeOpacity );
@@ -462,13 +462,22 @@ void ColorLayerImageViewPanel::onSliceImage(wxScrollEvent& event)
 }
 
 //----------------------------------------------------------------------------
-void ColorLayerImageViewPanel::onChangeOpacity(wxScrollEvent& event)
+void ColorLayerImageViewPanel::ChangeOpacity()
 {
        int opacity = _opacity->GetValue();
        _colorLayerImageViewManager->onThresholdChangeOpacity(opacity);
        RefreshView();
 }
 
+//----------------------------------------------------------------------------
+void ColorLayerImageViewPanel::onChangeOpacity(wxScrollEvent& event)
+{
+       ChangeOpacity();
+//     int opacity = _opacity->GetValue();
+//     _colorLayerImageViewManager->onThresholdChangeOpacity(opacity);
+//     RefreshView();
+}
+
 
 //----------------------------------------------------------------------------
 bool ColorLayerImageViewPanel::IsVisible()