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
109 QCoreApplication::postEvent(QCoreApplication::instance(), event);109 QCoreApplication::postEvent(QCoreApplication::instance(), event);
110}110}
111 111
112void InteractiveWindow::emitMainWindowResizeEvent() {
113 emit qApp->getWindow()->windowGeometryChanged(qApp->getWindow()->geometry());
114}
115
112/**jsdoc116/**jsdoc
113 * A set of properties used when creating an <code>InteractiveWindow</code>.117 * A set of properties used when creating an <code>InteractiveWindow</code>.
114 * @typedef {object} InteractiveWindow.Properties118 * @typedef {object} InteractiveWindow.Properties
@@ -215,10 +219,11 @@ InteractiveWindow::InteractiveWindow(const QString& sourceUrl, const QVariantMap · 100 unmodified lines
215 Qt::QueuedConnection);219 Qt::QueuedConnection);
216 QObject::connect(rootItem, SIGNAL(keyReleaseEvent(int, int)), this, SLOT(forwardKeyReleaseEvent(int, int)),220 QObject::connect(rootItem, SIGNAL(keyReleaseEvent(int, int)), this, SLOT(forwardKeyReleaseEvent(int, int)),
217 Qt::QueuedConnection);221 Qt::QueuedConnection);
218 emit mainWindow->windowGeometryChanged(qApp->getWindow()->geometry());
219 }222 }
220 });223 });
221 224
225 QObject::connect(_dockWidget.get(), SIGNAL(onResizeEvent()), this, SLOT(emitMainWindowResizeEvent()));
226
222 _dockWidget->setSource(QUrl(sourceUrl));227 _dockWidget->setSource(QUrl(sourceUrl));
223 mainWindow->addDockWidget(dockArea, _dockWidget.get());228 mainWindow->addDockWidget(dockArea, _dockWidget.get());
224 } else {229 } 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