git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f8f41a0
)
JAL-591 reduced updating by checking/setting 'updating' flag
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Thu, 10 May 2018 14:17:20 +0000
(15:17 +0100)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Thu, 10 May 2018 14:17:20 +0000
(15:17 +0100)
src/jalview/gui/OptsAndParamsPage.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/OptsAndParamsPage.java
b/src/jalview/gui/OptsAndParamsPage.java
index
5ef7169
..
dcd07ef
100644
(file)
--- a/
src/jalview/gui/OptsAndParamsPage.java
+++ b/
src/jalview/gui/OptsAndParamsPage.java
@@
-552,13
+552,23
@@
public class OptsAndParamsPage
*/
private void checkIfModified()
{
*/
private void checkIfModified()
{
- Object newValue = updateSliderFromValueField();
- boolean modified = true;
- if (newValue.getClass() == lastVal.getClass())
+ if (!adjusting)
{
{
- modified = !newValue.equals(lastVal);
+ try
+ {
+ adjusting = true;
+ Object newValue = updateSliderFromValueField();
+ boolean modified = true;
+ if (newValue.getClass() == lastVal.getClass())
+ {
+ modified = !newValue.equals(lastVal);
+ }
+ pmdialogbox.argSetModified(this, modified);
+ } finally
+ {
+ adjusting = false;
+ }
}
}
- pmdialogbox.argSetModified(this, modified);
}
@Override
}
@Override
@@
-632,8
+642,13
@@
public class OptsAndParamsPage
@Override
public void stateChanged(ChangeEvent e)
{
@Override
public void stateChanged(ChangeEvent e)
{
- if (!adjusting)
+ if (adjusting)
{
{
+ return;
+ }
+ try
+ {
+ adjusting = true;
if (!isLogarithmicParameter)
{
/*
if (!isLogarithmicParameter)
{
/*
@@
-651,6
+666,9
@@
public class OptsAndParamsPage
valueField.setText(formatDouble(value));
}
checkIfModified();
valueField.setText(formatDouble(value));
}
checkIfModified();
+ } finally
+ {
+ adjusting = false;
}
}
}
}