We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 405ace7 commit 991e10fCopy full SHA for 991e10f
src/main/kotlin/com/redhat/devtools/intellij/kubernetes/editor/EditorResource.kt
@@ -57,14 +57,19 @@ open class EditorResource(
57
* @see [areEqual]
58
* @see [isSameResource]
59
* @see [setState]
60
+ * @see [getState]
61
*/
62
fun setResource(new: HasMetadata) {
63
resourceChangeMutex.withLock {
64
val existing = this.resource
65
if (new.isSameResource(existing)
66
&& !areEqual(new, existing)) {
67
this.resource = new
- setState(null) // reset state
68
+ /**
69
+ * only reset state if resource is modified
70
+ * to preserve existing error, pushed/pulled state
71
+ */
72
+ setState(null)
73
}
74
75
0 commit comments