From 97d45e6c3f1858fa51daec5655dc93a92c79a955 Mon Sep 17 00:00:00 2001
From: Thomas Grill <xovo@users.sourceforge.net>
Date: Sun, 23 Feb 2003 12:52:25 +0000
Subject:  ""

svn path=/trunk/; revision=425
---
 externals/grill/vst/src/PopupWindow.cpp | 9 +++++----
 externals/grill/vst/src/main.cpp        | 4 ++--
 2 files changed, 7 insertions(+), 6 deletions(-)

(limited to 'externals/grill/vst/src')

diff --git a/externals/grill/vst/src/PopupWindow.cpp b/externals/grill/vst/src/PopupWindow.cpp
index 35c30a81..92fbabd2 100644
--- a/externals/grill/vst/src/PopupWindow.cpp
+++ b/externals/grill/vst/src/PopupWindow.cpp
@@ -60,7 +60,6 @@ void CPopupWindow::SetPlugin(VSTPlugin *p)
 	CreateEx( WS_EX_DLGMODALFRAME,AfxRegisterWndClass(CS_DBLCLKS),tmp,WS_CAPTION|WS_THICKFRAME|WS_POPUP|WS_SYSMENU,0,0,0,0,NULL,NULL,NULL);
     
 	plug->Dispatch(effEditOpen , 0 , 0 , m_hWnd , 0.0f  );
-	RECT r = plug->GetEditorRect();
 /*
 	CString str = theApp->GetProfileString( "VSTPos" , plug->GetName() , "10,10");
 	int idx = str.Find(",");
@@ -68,11 +67,13 @@ void CPopupWindow::SetPlugin(VSTPlugin *p)
 	CString y = str.Right( idx );
 	printf(" index is %d left is %s and right is %s" , idx , x , y);	
 */
-	SetWindowPos(&wndTopMost,plug->getX(),plug->getY(),(r.right - r.left) + 10 , r.bottom - r.top + 30 , SWP_SHOWWINDOW);
 
 	DoInit();
-	ShowWindow( SW_SHOW );		
-	BringWindowToTop();
+
+	RECT r = plug->GetEditorRect();
+	SetWindowPos(&wndTop,plug->getX(),plug->getY(),(r.right - r.left) + 10 , r.bottom - r.top + 30 , SWP_SHOWWINDOW);
+//	ShowWindow( SW_SHOW );		
+//	BringWindowToTop();
 //	SetFocus();
 }
 
diff --git a/externals/grill/vst/src/main.cpp b/externals/grill/vst/src/main.cpp
index fc4dd7d5..739d7276 100644
--- a/externals/grill/vst/src/main.cpp
+++ b/externals/grill/vst/src/main.cpp
@@ -19,7 +19,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
 #include <direct.h>
 #include <io.h>
 
-#define VST_VERSION "0.1.0pre"
+#define VST_VERSION "0.1.0pre3"
 
 #if 0
 /* ----- MFC stuff ------------- */
@@ -378,7 +378,7 @@ BL vst::ms_plug(I argc,const A *argv)
 	}
 
     // re-init dsp stuff 
-    InitPlug();
+    if(plug) InitPlug();
 
     return lf;
 }
-- 
cgit v1.2.1