Kaydet (Commit) 42fae43d authored tarafından Pranav Kant's avatar Pranav Kant

lokdialog: Open floating window on InitShow only

Okay, my bad. InitShow happens after Visible. And InitShow also does
some layouting. Emitting the created callback on InitShow means sending
more accurate sizes, etc. The different in sizes is 0 for combo boxes,
but significant for custom controls like color picker, etc. So emit
created callback on InitShow to keep custom controls working.

Change-Id: I40b6a18b917dff0eebcfd4c273f3399f3bdc7456
üst 13ca879f
......@@ -604,9 +604,9 @@ void FloatingWindow::StateChanged( StateChangedType nType )
SystemWindow::StateChanged( nType );
VclPtr<vcl::Window> pParent = GetParentWithLOKNotifier();
if (pParent && nType == StateChangedType::Visible)
if (pParent)
{
if (IsVisible())
if (nType == StateChangedType::InitShow)
{
std::vector<vcl::LOKPayloadItem> aItems;
if (pParent == this)
......@@ -626,7 +626,7 @@ void FloatingWindow::StateChanged( StateChangedType nType )
aItems.emplace_back(std::make_pair("position", mpImplData->maPos.toString()));
GetLOKNotifier()->notifyWindow(GetLOKWindowId(), "created", aItems);
}
else if (!IsVisible())
else if (!IsVisible() && nType == StateChangedType::Visible)
{
assert(GetLOKNotifier());
GetLOKNotifier()->notifyWindow(GetLOKWindowId(), "close");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment