Fixing a glitch in the data mapping widget (when editing the value, the node got deselected, but the colors boxes were still enabled)

This commit is contained in:
Matthias Koefferlein 2026-05-09 23:09:11 +02:00
parent 17f5b4f2da
commit 5c9ccf34f7
2 changed files with 41 additions and 37 deletions

View File

@ -314,11 +314,9 @@ PropertiesPage::min_max_value_changed ()
emit edited ();
}
void
PropertiesPage::color_mapping_changed ()
bool
PropertiesPage::update_controls ()
{
if (! m_no_signals) {
bool has_error = false;
value_le->setText (QString ());
@ -348,13 +346,17 @@ PropertiesPage::color_mapping_changed ()
}
if (! has_error) {
return has_error;
}
void
PropertiesPage::color_mapping_changed ()
{
if (! m_no_signals && ! update_controls ()) {
m_in_color_mapping_signal = true;
emit edited ();
m_in_color_mapping_signal = false;
}
}
}
void
@ -509,6 +511,7 @@ PropertiesPage::update ()
m_no_signals = false;
update_controls ();
recompute_histogram ();
}

View File

@ -101,6 +101,7 @@ private:
void invalidate ();
void init ();
void get_xmin_xmax (double &xmin, double &xmax, bool &has_error_out);
bool update_controls ();
};
}