Skip to content

Commit

Permalink
Merge pull request #1958 from KLayout/bugfix/issue-1953
Browse files Browse the repository at this point in the history
Fixing bug #1953 (inconsistent behavior of callback) maybe
  • Loading branch information
klayoutmatthias authored Jan 4, 2025
2 parents 9e98b0d + d9048f7 commit 64bfe9f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/edt/edt/edtPCellParametersPage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ PCellParametersPage::setup (lay::LayoutViewBase *view, int cv_index, const db::P
m_initial_states = m_states;
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_main_frame->show ();
Expand Down Expand Up @@ -713,7 +713,7 @@ PCellParametersPage::do_parameter_changed ()
db::ParameterStates states = m_states;
get_parameters (states, &ok); // includes coerce
if (ok) {
update_widgets_from_states (states);
update_widgets_from_states (states, lazy_evaluation ());
if (! lazy_evaluation ()) {
emit edited ();
}
Expand Down Expand Up @@ -959,11 +959,11 @@ PCellParametersPage::set_parameters (const std::vector<tl::Variant> &parameters)
m_initial_states = m_states;
mp_error_frame->hide ();

set_parameters_internal (m_states, false);
update_widgets_from_states (m_states, false);
}

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) {
return;
Expand Down Expand Up @@ -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,
// so we help a little here:
Expand Down
2 changes: 1 addition & 1 deletion src/edt/edt/edtPCellParametersPage.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ private slots:
bool lazy_evaluation ();
void set_parameters_internal (const db::ParameterStates &states, bool tentatively);
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);
std::vector<tl::Variant> parameter_from_states (const db::ParameterStates &states) const;
void states_from_parameters (db::ParameterStates &states, const std::vector<tl::Variant> &parameters);
Expand Down

0 comments on commit 64bfe9f

Please sign in to comment.