![]() |
BUG Crash in ClosePane |
Post Reply ![]() |
Author | |
MacW ![]() Senior Member ![]() Joined: 26 June 2007 Status: Offline Points: 253 |
![]() ![]() ![]() ![]() ![]() Posted: 08 August 2011 at 2:02pm |
XTP 15.02 with Visual Studio 2010 on W7
I have a reproducible bug when calling CXTPDockingPane* ppane = m_paneManager.FindPane(ID); if (ppane) { if (ppane->IsClosed()) { ppane->SetEnabled(xtpPaneEnabled); m_paneManager.ShowPane(ppane); } else { ppane->SetEnabled(xtpPaneDisabled); m_paneManager.ClosePane(ppane); } } XTP crashes in NotifyAction() void CXTPDockingPaneAutoHidePanel::CloseActiveWindow(BOOL bDelayed) { if (!m_bCloseActiveWindow) return; if (m_pActiveWnd) { if (m_pActiveWnd->m_pPane) { // BUG m_pActiveWnd->m_pPane->GetSelected() is NULL if (GetDockingPaneManager()->NotifyAction(xtpPaneActionCollapsing, m_pActiveWnd->m_pPane->GetSelected())) return; GetDockingPaneManager()->NotifyAction(xtpPaneActionCollapsed, m_pActiveWnd->m_pPane->GetSelected()); } If the pane I'm trying to close is an autohide panel (IsHidden() returns true) and the pane is currently visible (opened but in auto-hide mode). ![]() |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Thanks, fixed.
btw, maybe you need xtpPaneEnableActions instead of xtpPaneDisabled to disable client part only but not all actions...
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
MacW ![]() Senior Member ![]() Joined: 26 June 2007 Status: Offline Points: 253 |
![]() ![]() ![]() ![]() ![]() |
I, Oleg
thanks. Can I make a work-around in your code so it works here till your next update? You Wrote: maybe you need xtpPaneEnableActions instead of xtpPaneDisabled to disable client part only but not all actions... Thanks. I will look into this. My code just wants to implement a method for the user to open/close panes via the keyboard. If a pane is a auto-hide pane I want to close it when it is not visible (collapsed) and hide it when it is visible. Closing/Showing normal panes that way works, but not for auto-hide panes. |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Problem can be reproduced only if you set xtpPaneDisabled - without it it won't crush. So most easy workaround here to not set xtpPaneDisabled before Close.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
MacW ![]() Senior Member ![]() Joined: 26 June 2007 Status: Offline Points: 253 |
![]() ![]() ![]() ![]() ![]() |
Ah, very well. Will do. Thanks!
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |