Notice: If you are member of any public project or group, please make sure that your GitLab username is not the same as the LRZ identifier/Kennung (see https://gitlab.lrz.de/profile/account). Please change your username if necessary. For more information see the section "Public projects / Öffentliche Projekte" at https://doku.lrz.de/display/PUBLIC/GitLab . Thank you!

Commit a23b1e70 authored by Jakob Weiss's avatar Jakob Weiss

DataContainerInspector now default floating

* InspectorWindow immediately detaches from the MDI surface
* some swapBuffers warning on first creation of the inspector remains
parent bdcedc2b
......@@ -43,6 +43,7 @@
#include "ext/cgt/navigation/trackball.h"
#include <QWindow>
namespace campvis {
......@@ -103,7 +104,7 @@ namespace campvis {
p_renderBChannel.setVisible(false);
p_renderAChannel.setVisible(false);
connect(this, &DataContainerInspectorCanvas::s_invalidated, this, &DataContainerInspectorCanvas::onInvalidated);
connect(this, &DataContainerInspectorCanvas::s_invalidated, this, &DataContainerInspectorCanvas::onInvalidated);
init();
}
......@@ -255,6 +256,11 @@ namespace campvis {
}
void DataContainerInspectorCanvas::onInvalidated() {
// Prevent drawing when the window is not yet exposed to the window manager
QWindow* wnd = dynamic_cast<QWindow*>(window()->windowHandle());
if (!wnd || !wnd->isExposed()) return;
// only if inited
if (_quad != 0 && _paintShader != 0 && this->isVisible()) {
......
......@@ -363,6 +363,7 @@ namespace campvis {
void MainWindow::onBtnShowDataContainerInspectorClicked() {
if (_selectedPipeline != 0) {
// if there is no existing inspector window, create one
if (_dcInspectorWindow == 0) {
_dcInspectorWindow = _mdiArea->addWidget(_dcInspectorWidget);
_dcInspectorWindow->setWindowTitle(tr("Data Container Inspector"));
......@@ -371,6 +372,8 @@ namespace campvis {
_dcInspectorWidget->setDataContainer(&(_selectedPipeline->getDataContainer()));
_dcInspectorWindow->show();
_dcInspectorWindow->activateWindow();
//_dcInspectorWindow->detachDockedWindow();
}
}
......
This diff is collapsed.
......@@ -86,6 +86,16 @@ namespace campvis {
*/
QAction* toggleViewAction() const;
/**
* Attaches the window to the MDI area if it is floating.
*/
void attachFloatingWindow();
/**
* Detaches the window to float freely if it is docked.
*/
void detachDockedWindow();
private slots:
/**
* Track the position of the associated floating MDI window and dock it if necessary.
......@@ -94,6 +104,7 @@ namespace campvis {
*/
void trackFloatingWindowPosition(const QPoint& newPos);
/**
* Track the position of the associated docked MDI window and detach it if necessary.
*
......
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