Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
thsa committed Oct 10, 2024
1 parent fa90e89 commit 8a64239
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
5 changes: 3 additions & 2 deletions src/main/java/com/actelion/research/chem/Molecule.java
Original file line number Diff line number Diff line change
Expand Up @@ -3475,8 +3475,9 @@ public void setBondQueryFeature(int bond, int feature, boolean value) {
mBondQueryFeatures[bond] |= feature;
else
mBondQueryFeatures[bond] &= ~feature;
mValidHelperArrays = cHelperNone; // there is an influence on occipied valence, bond order, etc.
mIsFragment = true;
mValidHelperArrays = cHelperNone; // there is an influence on occupied valence, bond order, etc.
if (value && feature != 0)
mIsFragment = true;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,6 @@ private void setQueryFeatures(int bond) {
queryFeatures |= Molecule.cBondQFQuadruple;
selectionCount++;
}
if (mCBDelocalized.isSelected()) {
bondType = Molecule.cBondTypeDelocalized;
queryFeatures |= Molecule.cBondQFDelocalized;
selectionCount++;
}
if (mCBTriple.isSelected()) {
bondType = Molecule.cBondTypeTriple;
queryFeatures |= Molecule.cBondQFTriple;
Expand All @@ -328,6 +323,11 @@ private void setQueryFeatures(int bond) {
queryFeatures |= Molecule.cBondQFDouble;
selectionCount++;
}
if (mCBDelocalized.isSelected()) {
bondType = Molecule.cBondTypeDelocalized;
queryFeatures |= Molecule.cBondQFDelocalized;
selectionCount++;
}
if (mCBSingle.isSelected()) {
bondType = Molecule.cBondTypeSingle;
queryFeatures |= Molecule.cBondQFSingle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ public void setCurrentTool(int tool) {
public void paintContent(GenericDrawContext context) {
int background = mToolbarCanvas.getBackgroundRGB();
boolean isDark = (ColorHelper.perceivedBrightness(background) < 0.5);
int highlightBackground = isDark ? ColorHelper.brighter(background, 0.6f) : ColorHelper.darker(background, 0.6f);
int selectedBackground = isDark ? ColorHelper.brighter(background, 0.8f) : ColorHelper.darker(background, 0.8f);
int highlightBackground = isDark ? ColorHelper.brighter(background, 0.3f) : ColorHelper.darker(background, 0.6f);
int selectedBackground = isDark ? ColorHelper.brighter(background, 0.5f) : ColorHelper.darker(background, 0.8f);

int sw = mImageNormal.getWidth();
int sh = mImageNormal.getHeight();
Expand Down

0 comments on commit 8a64239

Please sign in to comment.