mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
restore enabled/visible prop events in copy
Fixes IDEA-285264 GitOrigin-RevId: 5d27f10529e18fa3048270e59a0890947cf1cb54
This commit is contained in:
committed by
intellij-monorepo-bot
parent
9b9deef0d2
commit
d854be65a1
@@ -383,9 +383,9 @@ public final class Presentation implements Cloneable {
|
||||
*/
|
||||
public void setEnabled(boolean enabled) {
|
||||
assertNotTemplatePresentation();
|
||||
boolean oldVisible = BitUtil.isSet(myFlags, IS_ENABLED);
|
||||
boolean oldEnabled = BitUtil.isSet(myFlags, IS_ENABLED);
|
||||
myFlags = BitUtil.set(myFlags, IS_ENABLED, enabled);
|
||||
fireBooleanPropertyChange(PROP_ENABLED, oldVisible, enabled);
|
||||
fireBooleanPropertyChange(PROP_ENABLED, oldEnabled, enabled);
|
||||
}
|
||||
|
||||
public void setEnabledAndVisible(boolean enabled) {
|
||||
@@ -443,6 +443,7 @@ public final class Presentation implements Cloneable {
|
||||
boolean forceNullComponent,
|
||||
boolean allFlags) {
|
||||
if (presentation == this) return;
|
||||
boolean oldEnabled = isEnabled(), oldVisible = isVisible();
|
||||
if (allFlags) {
|
||||
myFlags = BitUtil.set(presentation.myFlags, IS_TEMPLATE, isTemplate());
|
||||
}
|
||||
@@ -450,6 +451,9 @@ public final class Presentation implements Cloneable {
|
||||
myFlags = BitUtil.set(myFlags, IS_ENABLED, BitUtil.isSet(presentation.myFlags, IS_ENABLED));
|
||||
myFlags = BitUtil.set(myFlags, IS_VISIBLE, BitUtil.isSet(presentation.myFlags, IS_VISIBLE));
|
||||
}
|
||||
fireBooleanPropertyChange(PROP_ENABLED, oldEnabled, isEnabled());
|
||||
fireBooleanPropertyChange(PROP_VISIBLE, oldVisible, isVisible());
|
||||
|
||||
setTextWithMnemonic(presentation.getTextWithPossibleMnemonic());
|
||||
setDescription(presentation.myDescriptionSupplier);
|
||||
setIcon(presentation.getIcon());
|
||||
|
||||
Reference in New Issue
Block a user