Commit 806d1993 authored by Vladimir Rudnev's avatar Vladimir Rudnev Committed by intellij-monorepo-bot
Browse files

Fix RIDER-100951. Correct path to icon.

(cherry picked from commit 1eca7b3f0a0bdbfb5aec5f02f9f8b7acc7797808)

IJ-CR-118622

GitOrigin-RevId: b0493719cc9fa2b1b179b21973d492d02e7dbcff
parent 0f6a51f5
Branches unavailable Tags unavailable
No related merge requests found
Showing with 4 additions and 1 deletion
+4 -1
......@@ -82,6 +82,9 @@ internal class ChangeProjectIconAction : RecentProjectsWelcomeScreenActionBase()
if (ui.iconRemoved) {
FileUtil.delete(ui.pathToIcon())
RecentProjectIconHelper.refreshProjectIcon(projectPath)
event.project?.let {
ProjectWindowCustomizerService.getInstance().dropProjectIconCache(it)
}
}
// Actually, we can try to drop the needed icon,
// but it is a very rare action and this whole cache drop will not have any performance impact.
......@@ -149,7 +152,7 @@ private class ProjectIconUI(private val projectPath: @SystemIndependent String)
.apply { targetComponent = iconLabel }
}
fun pathToIcon() = Path("${projectPath}/.idea/icon.svg")
fun pathToIcon() = RecentProjectIconHelper.getDotIdeaPath(projectPath)?.resolve("icon.svg") ?: Path("${projectPath}/.idea/icon.svg")
}
private class IconPreviewPanel(component: JComponent) : JPanel(BorderLayout()) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment