From 47138e44125a87bfe5c890c367ceee70435389bf Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Thu, 3 May 2018 22:17:43 +0000 Subject: [PATCH] tvplanit: Prevent VpNavBar component editor playing sounds in design mode. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6376 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/tvplanit/source/vpnavbar.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/tvplanit/source/vpnavbar.pas b/components/tvplanit/source/vpnavbar.pas index 184e04828..98a814db2 100644 --- a/components/tvplanit/source/vpnavbar.pas +++ b/components/tvplanit/source/vpnavbar.pas @@ -2747,7 +2747,9 @@ begin {animated scroll} if FActiveFolder > -1 then begin {play sound} - if FPlaySounds and (FSoundAlias <> '') and FileExists(FSoundAlias) then + if not (csDesigning in ComponentState) and FPlaySounds and + (FSoundAlias <> '') and FileExists(FSoundAlias) + then PlaySound(FSoundAlias, psmAsync); (* if FPlaySounds and (FSoundAlias > '') then begin