Try to fix an unwanted left mouse release button event, when closing a dialog on a click or double click,

and therefore when the mouse butoon is released in the parent window
Minor other fixes.
This commit is contained in:
jean-pierre charras
2012-12-06 22:53:00 +01:00
parent c648806703
commit 14fcf7f933
18 changed files with 9463 additions and 9725 deletions
+10 -8
View File
@@ -100,10 +100,10 @@ static wxAcceleratorEntry accels[] =
#define EXTRA_BORDER_SIZE 2
#define LIB_VIEW_FRAME_NAME wxT( "ViewlibFrame" )
LIB_VIEW_FRAME::LIB_VIEW_FRAME( wxWindow* father, CMP_LIBRARY* Library,
wxSemaphore* semaphore, long style ) :
SCH_BASE_FRAME( father, VIEWER_FRAME_TYPE, _( "Library Browser" ),
wxDefaultPosition, wxDefaultSize, style, GetLibViewerFrameName() )
LIB_VIEW_FRAME::LIB_VIEW_FRAME( SCH_BASE_FRAME* aParent, CMP_LIBRARY* aLibrary,
wxSemaphore* aSemaphore, long aStyle ) :
SCH_BASE_FRAME( aParent, VIEWER_FRAME_TYPE, _( "Library Browser" ),
wxDefaultPosition, wxDefaultSize, aStyle, GetLibViewerFrameName() )
{
wxAcceleratorTable table( ACCEL_TABLE_CNT, accels );
@@ -121,7 +121,7 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( wxWindow* father, CMP_LIBRARY* Library,
m_LibList = NULL;
m_LibListWindow = NULL;
m_CmpListWindow = NULL;
m_Semaphore = semaphore;
m_Semaphore = aSemaphore;
if( m_Semaphore )
SetModalMode( true );
m_exportToEeschemaCmpName.Empty();
@@ -146,7 +146,7 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( wxWindow* father, CMP_LIBRARY* Library,
wxPoint win_pos( 0, 0 );
if( Library == NULL )
if( aLibrary == NULL )
{
// Creates the libraries window display
m_LibListWindow =
@@ -163,7 +163,7 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( wxWindow* father, CMP_LIBRARY* Library,
}
else
{
m_libraryName = Library->GetName();
m_libraryName = aLibrary->GetName();
m_entryName.Clear();
m_unit = 1;
m_convert = 1;
@@ -507,7 +507,9 @@ void LIB_VIEW_FRAME::DClickOnCmpList( wxCommandEvent& event )
// Prevent the double click from being as a single click in the parent
// window which would cause the part to be parked rather than staying
// in drag mode.
event.StopPropagation();
// event.StopPropagation();
((SCH_BASE_FRAME*) GetParent())->IgnoreLeftButtonReleaseEvent();
}
}