mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-350081 Impossible to restore toolbar defaults if there was an action with custom icon
GitOrigin-RevId: 37b460a710bbd1ffdd790d67bbb9200f35808360
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e18fcc8d0f
commit
4c20079b2b
@@ -65,8 +65,9 @@ class CustomActionsSchema(private val coroutineScope: CoroutineScope?) : Persist
|
||||
* * path to the SVG or PNG file of the icon
|
||||
* * URL of the SVG or PNG icon
|
||||
*/
|
||||
// do not use Map.of - value is nullable
|
||||
@Volatile
|
||||
private var iconCustomizations: Map<String, String?> = java.util.Map.of()
|
||||
private var iconCustomizations: Map<String, String?> = Collections.emptyMap()
|
||||
private val lock = Any()
|
||||
|
||||
// ordered map, do not use hash map
|
||||
@@ -182,7 +183,7 @@ class CustomActionsSchema(private val coroutineScope: CoroutineScope?) : Persist
|
||||
for (id in ids) {
|
||||
iconCustomizations.putIfAbsent(id, null)
|
||||
}
|
||||
this.iconCustomizations = java.util.Map.copyOf(iconCustomizations)
|
||||
this.iconCustomizations = Collections.unmodifiableMap(iconCustomizations)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,7 +245,7 @@ class CustomActionsSchema(private val coroutineScope: CoroutineScope?) : Persist
|
||||
isFirstLoadState = false
|
||||
}
|
||||
|
||||
this.iconCustomizations = java.util.Map.copyOf(iconCustomizations)
|
||||
this.iconCustomizations = Collections.unmodifiableMap(iconCustomizations)
|
||||
}
|
||||
coroutineScope?.launch {
|
||||
if (!iconCustomizations.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user