History

Ensure that geometryChanged is emitted after docked widget is resized

Zach Fox committed 7 years ago

Commit 083470e1 parent b40d5654 files · +22 −1Browse files

Showing the changes to interface/src/ui/InteractiveWindow.cpp (1 of 4 files). Show all

Unified · Split

interface/src/ui/InteractiveWindow.cpp+6−1
@@ -109,6 +109,10 @@ void InteractiveWindow::forwardKeyReleaseEvent(int key, int modifiers) { · 108 unmodified lines
109109 QCoreApplication::postEvent(QCoreApplication::instance(), event);
110110 }
111111
112+void InteractiveWindow::emitMainWindowResizeEvent() {
113+ emit qApp->getWindow()->windowGeometryChanged(qApp->getWindow()->geometry());
114+}
115+
112116 /**jsdoc
113117 * A set of properties used when creating an <code>InteractiveWindow</code>.
114118 * @typedef {object} InteractiveWindow.Properties
@@ -215,10 +219,11 @@ InteractiveWindow::InteractiveWindow(const QString& sourceUrl, const QVariantMap · 100 unmodified lines
215219 Qt::QueuedConnection);
216220 QObject::connect(rootItem, SIGNAL(keyReleaseEvent(int, int)), this, SLOT(forwardKeyReleaseEvent(int, int)),
217221 Qt::QueuedConnection);
218− emit mainWindow->windowGeometryChanged(qApp->getWindow()->geometry());
219222 }
220223 });
221224
225+ QObject::connect(_dockWidget.get(), SIGNAL(onResizeEvent()), this, SLOT(emitMainWindowResizeEvent()));
226+
222227 _dockWidget->setSource(QUrl(sourceUrl));
223228 mainWindow->addDockWidget(dockArea, _dockWidget.get());
224229 } else {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t