-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with wx.aui.AuiManager (wxWidget 3.1.6 --> 3.1.7) #22533
Comments
Sorry, I can't reproduce this with the following patch which seems to faithfully reproduce your Python example: diff --git a/samples/aui/auidemo.cpp b/samples/aui/auidemo.cpp
index 1e415b311b..1816bef0d2 100644
--- a/samples/aui/auidemo.cpp
+++ b/samples/aui/auidemo.cpp
@@ -668,6 +668,7 @@ bool MyApp::OnInit()
// set frame icon
SetIcon(wxIcon(sample_xpm));
+#if 0
// set up default notebook style
m_notebook_style = wxAUI_NB_DEFAULT_STYLE | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER;
m_notebook_theme = 0;
@@ -1001,6 +1002,13 @@ bool MyApp::OnInit()
m_perspectives.Add(perspective_default);
m_perspectives.Add(perspective_all);
+#else
+ m_mgr.AddPane(new wxPanel(this), wxAuiPaneInfo().CenterPane());
+ m_mgr.AddPane(new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(100, 100)),
+ wxAuiPaneInfo().Float().Caption("p1"));
+ m_mgr.AddPane(new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(100, 100)),
+ wxAuiPaneInfo().Float().Caption("p2"));
+#endif
// "commit" all changes made to wxAuiManager
m_mgr.Update(); There must be something specific to your setup which triggers this bug, but I have no idea what could it be... |
Thank you for taking the time to check this problem. It is mysterious... I'll also ask the Phoenix community. |
This can be reproduced on Windows 10 64bit / wxWidgets-3.1.7 build with VS 2019. Code Example (click to expand)#include <wx/wx.h>
#include <wx/aui/aui.h>
class MyFrame : public wxFrame
{
public:
MyFrame(wxWindow* parent) : wxFrame(parent, -1, _("wxAUI Test"),
wxDefaultPosition, wxSize(400, 300),
wxDEFAULT_FRAME_STYLE)
{
m_mgr.SetManagedWindow(this);
wxTextCtrl* text0 = new wxTextCtrl(this, -1, _("Main content window"),
wxDefaultPosition, wxSize(200, 150),
wxNO_BORDER | wxTE_MULTILINE);
wxTextCtrl* text1 = new wxTextCtrl(this, -1, _("Pane 1 - sample text"),
wxDefaultPosition, wxSize(200, 150),
wxNO_BORDER | wxTE_MULTILINE);
wxTextCtrl* text2 = new wxTextCtrl(this, -1, _("Pane 2 - sample text"),
wxDefaultPosition, wxSize(200, 150),
wxNO_BORDER | wxTE_MULTILINE);
m_mgr.AddPane(text0, wxAuiPaneInfo().CenterPane());
m_mgr.AddPane(text1, wxAuiPaneInfo().Float().Caption("p1"));
m_mgr.AddPane(text2, wxAuiPaneInfo().Float().Caption("p2"));
m_mgr.Update();
}
~MyFrame()
{
m_mgr.UnInit();
}
private:
wxAuiManager m_mgr;
};
class MyApp : public wxApp
{
public:
bool OnInit()
{
wxFrame* frame = new MyFrame(NULL);
SetTopWindow(frame);
frame->Show();
return true;
}
};
DECLARE_APP(MyApp);
IMPLEMENT_APP(MyApp); |
I can reproduce the bug with this code, it was introduced in commit e777a82 |
Thanks for debugging this! @valid-ptr Could you please look at this, as this seems to be due to your change? |
It is reproduce able in Code::Blocks on Windows built with wxWidgets 3.1.7 or 3.2.0, but not 3.1.6. I have build 3.1.6. with the 3.1.7 src\aui\floatpane.cpp file and it has the issue. C::B discussion about this can be seen in the following thread: |
If there are no comments from @valid-ptr we're going to revert e777a82 to fix this. |
Hi! Sorry for delay. I've checked it right now. So, it seems to be a bug on windows platform only. |
Thanks for looking at this! The problem is that it's a regression, i.e. it worked correctly before. As I don't know what's going on here and probably won't have time to debug it, reverting the change is the simplest way to fix this bug for me. If you can find another way to fix it while also preserving your original fix, it would be even better, of course, but we need to fix it in some way. |
PR #22651 solves this problem. |
Thanks for the fix, it looks like this should indeed restore the old behaviour but if people could please confirm that this fixes the problem in their applications, it would be still welcome. TIA! |
PR #22651 fixes the issue I have been seeing with C::B floating panes. |
PR #22651 fixes the problem. |
The problem is with wx.aui.AuiManager on wxPython, and I reported it on Phoenix issue tracker: wxWidgets/Phoenix#2187.
This occurs in the latest snapshot of wxPython which is built on the new version wxWidget 3.1.7.
It seems to be coming from upstream (wxWidget), but with MSW only, not with other platforms.
Describe the bug
Each time you drag one floating pane window, the other floating panes drift.
In the demo video, every time you drag the pane [p1], the pane [p2] drifts. It will no longer move once you touch the pane [p2].
isuue-aui-manager_clip.mp4
The text was updated successfully, but these errors were encountered: