]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/rearrangectrl.cpp
Use wxDCPenChanger instead of setting/resetting pen explicitly.
[wxWidgets.git] / src / common / rearrangectrl.cpp
index 6027fd2fb386b96bb4bc1aebc3f50f0526b3b865..c9a27121cb98bf9726e0b2f3cadfc69bf0dc8242 100644 (file)
@@ -285,8 +285,19 @@ bool wxRearrangeDialog::Create(wxWindow *parent,
     // notice that the items in this sizer should be inserted accordingly to
     // wxRearrangeDialogSizerPositions order
     wxSizer * const sizerTop = new wxBoxSizer(wxVERTICAL);
-    sizerTop->Add(new wxStaticText(this, wxID_ANY, message),
-                  wxSizerFlags().Border());
+
+    if ( !message.empty() )
+    {
+        sizerTop->Add(new wxStaticText(this, wxID_ANY, message),
+                      wxSizerFlags().Border());
+    }
+    else
+    {
+        // for convenience of other wxRearrangeDialog code that depends on
+        // positions of sizer items, insert a dummy zero-sized item
+        sizerTop->AddSpacer(0);
+    }
+
     sizerTop->Add(m_ctrl,
                   wxSizerFlags(1).Expand().Border());
     sizerTop->Add(CreateSeparatedButtonSizer(wxOK | wxCANCEL),