mirror of https://github.com/KLayout/klayout.git
Merge pull request #1958 from KLayout/bugfix/issue-1953
Fixing bug #1953 (inconsistent behavior of callback) maybe
This commit is contained in:
commit
64bfe9f118
|
|
@ -614,7 +614,7 @@ PCellParametersPage::setup (lay::LayoutViewBase *view, int cv_index, const db::P
|
||||||
m_initial_states = m_states;
|
m_initial_states = m_states;
|
||||||
mp_error_frame->hide ();
|
mp_error_frame->hide ();
|
||||||
|
|
||||||
update_widgets_from_states (m_states);
|
update_widgets_from_states (m_states, lazy_evaluation ());
|
||||||
|
|
||||||
mp_parameters_area->setWidget (mp_main_frame);
|
mp_parameters_area->setWidget (mp_main_frame);
|
||||||
mp_main_frame->show ();
|
mp_main_frame->show ();
|
||||||
|
|
@ -713,7 +713,7 @@ PCellParametersPage::do_parameter_changed ()
|
||||||
db::ParameterStates states = m_states;
|
db::ParameterStates states = m_states;
|
||||||
get_parameters (states, &ok); // includes coerce
|
get_parameters (states, &ok); // includes coerce
|
||||||
if (ok) {
|
if (ok) {
|
||||||
update_widgets_from_states (states);
|
update_widgets_from_states (states, lazy_evaluation ());
|
||||||
if (! lazy_evaluation ()) {
|
if (! lazy_evaluation ()) {
|
||||||
emit edited ();
|
emit edited ();
|
||||||
}
|
}
|
||||||
|
|
@ -959,11 +959,11 @@ PCellParametersPage::set_parameters (const std::vector<tl::Variant> ¶meters)
|
||||||
m_initial_states = m_states;
|
m_initial_states = m_states;
|
||||||
mp_error_frame->hide ();
|
mp_error_frame->hide ();
|
||||||
|
|
||||||
set_parameters_internal (m_states, false);
|
update_widgets_from_states (m_states, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PCellParametersPage::update_widgets_from_states (const db::ParameterStates &states)
|
PCellParametersPage::update_widgets_from_states (const db::ParameterStates &states, bool tentatively)
|
||||||
{
|
{
|
||||||
if (! mp_pcell_decl) {
|
if (! mp_pcell_decl) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -1031,7 +1031,7 @@ PCellParametersPage::update_widgets_from_states (const db::ParameterStates &stat
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set_parameters_internal (states, lazy_evaluation ());
|
set_parameters_internal (states, tentatively);
|
||||||
|
|
||||||
// QGridLayouts are bad in handling nested QFrame (or QGroupBox) with their own layouts,
|
// QGridLayouts are bad in handling nested QFrame (or QGroupBox) with their own layouts,
|
||||||
// so we help a little here:
|
// so we help a little here:
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@ private:
|
||||||
bool lazy_evaluation ();
|
bool lazy_evaluation ();
|
||||||
void set_parameters_internal (const db::ParameterStates &states, bool tentatively);
|
void set_parameters_internal (const db::ParameterStates &states, bool tentatively);
|
||||||
bool update_current_parameters ();
|
bool update_current_parameters ();
|
||||||
void update_widgets_from_states (const db::ParameterStates &states);
|
void update_widgets_from_states (const db::ParameterStates &states, bool tentatively);
|
||||||
void get_parameters_internal (db::ParameterStates &states, bool &edit_error);
|
void get_parameters_internal (db::ParameterStates &states, bool &edit_error);
|
||||||
std::vector<tl::Variant> parameter_from_states (const db::ParameterStates &states) const;
|
std::vector<tl::Variant> parameter_from_states (const db::ParameterStates &states) const;
|
||||||
void states_from_parameters (db::ParameterStates &states, const std::vector<tl::Variant> ¶meters);
|
void states_from_parameters (db::ParameterStates &states, const std::vector<tl::Variant> ¶meters);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue