Commit b3404b86 authored by LACROIX Romain's avatar LACROIX Romain

Merge branch 'release/2.19.0'

parents 6176bb21 254673e1
# Change Log:
# 2.19.0 04-Feb-2020
- raise maximum values for spin boxes
- optionally do not include class name in scalar bar title
# 2.18.2 28-Jan-2020
- Fix set visibility for Streamlines decorator when source sphere widget doesn't have an interactor
......
......@@ -23,8 +23,8 @@ project(dtkVisualization)
## ###################################################################
set(${PROJECT_NAME}_VERSION_MAJOR 2)
set(${PROJECT_NAME}_VERSION_MINOR 18)
set(${PROJECT_NAME}_VERSION_PATCH 2)
set(${PROJECT_NAME}_VERSION_MINOR 19)
set(${PROJECT_NAME}_VERSION_PATCH 0)
set(${PROJECT_NAME}_VERSION
${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH})
......
......@@ -221,7 +221,7 @@ void dtkVisualizationCanvas::addScalarBar(vtkScalarBarActor *scalar_bar)
++d->nb_scalar_bars;
std::size_t orientation = d->nb_scalar_bars % 2; // 0: horizontal, 1: vertical
std::size_t side = (d->nb_scalar_bars % 4) < 2; // 0: right, 1: left
std::size_t side = (d->nb_scalar_bars % 4) >= 2; // 0: right/top, 1: left/bottom
scalar_bar->SetOrientation(orientation);
......
......@@ -302,6 +302,7 @@ dtkVisualizationDecoratorVectorStreamTracer::dtkVisualizationDecoratorVectorStre
d->sp_integrator_max_lengths->setObjectName("Max Stream Length");
d->sp_radius = new QDoubleSpinBox;
d->sp_radius->setMaximum(99999999);
d->sp_radius->setValue(1.0);
d->sp_radius->setSingleStep(0.1);
d->sp_radius->setDecimals(4);
......
......@@ -53,6 +53,7 @@ dtkVisualizationDecoratorWithClutPrivate::dtkVisualizationDecoratorWithClutPriva
this->scalar_bar->SetWidth(0.08);
this->scalar_bar->SetHeight(0.6);
this->scalar_bar->SetVisibility(false);
this->scalar_bar_label_includes_decorator_name = true;
// Fields
......@@ -672,12 +673,22 @@ bool dtkVisualizationDecoratorWithClut::setCurrentFieldName(const QString& field
d->fields_box->blockSignals(false);
d->scalar_bar->UnconstrainedFontSizeOn();
d->scalar_bar->SetTitle(qPrintable(this->objectName()+"/"+d->current_field_name));
const QString title_prefix =
d->scalar_bar_label_includes_decorator_name
? (this->objectName()+"/")
: "";
d->scalar_bar->SetTitle(qPrintable(title_prefix+d->current_field_name));
d->scalar_bar->Modified();
return true;
}
void dtkVisualizationDecoratorWithClut::setScalarBarLabelIncludesDecoratorName(bool value)
{
d->scalar_bar_label_includes_decorator_name = value;
}
void dtkVisualizationDecoratorWithClut::setCurrentRange(double min, double max)
{
if (d->current_field_name.isEmpty() && d->default_field_name.isEmpty()) {
......
......@@ -60,6 +60,9 @@ public:
public:
QString fieldName(void) const;
public:
virtual void setScalarBarLabelIncludesDecoratorName(bool);
protected:
void restoreSettings(void) override;
......
......@@ -99,6 +99,7 @@ public:
QString default_color_map;
bool default_visibility;
bool default_show_scalar_bar;
bool scalar_bar_label_includes_decorator_name;
public:
vtkSmartPointer<vtkColorTransferFunction> color_function;
......
......@@ -73,8 +73,8 @@ dtkVisualizationWidgetsScalarControl::dtkVisualizationWidgetsScalarControl(const
d->reset_value = reset;
QLayout *layout = new QHBoxLayout;
d->spbox->setMinimum(-100000);
d->spbox->setMaximum( 100000);
d->spbox->setMinimum(-999999999);
d->spbox->setMaximum( 999999999);
d->spbox->setDecimals(5);
d->spbox->setKeyboardTracking(false);
d->breset->setToolTip("Reset");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment