Commit fe3ab236 authored by Benjamin Jakimow's avatar Benjamin Jakimow
Browse files
parent 41f2b4a0
Pipeline #13951 failed with stage
in 5 seconds
......@@ -26,7 +26,7 @@ import typing
import pathlib
import numpy as np
from qgis.PyQt.QtCore import pyqtSignal, pyqtSlot, QObject, QFile, Qt, QSize, QCoreApplication, \
QVariant, QDate, QDateTime
QVariant, QDate, QDateTime, QTimer
from qgis.PyQt.QtGui import QCloseEvent, QColor, QIcon
from qgis.PyQt.QtWidgets import QWidget, QHBoxLayout, QVBoxLayout, QGridLayout, QMainWindow, \
QToolButton, QAction, QLabel, QProgressBar, QApplication, QSizePolicy, \
......@@ -167,7 +167,7 @@ class EOTimeSeriesViewerUI(QMainWindow):
#self.dockSpectralLibrary = self.addDockWidget(area, panel)
#self.tabifyDockWidget(self.dockTimeSeries, self.dockSpectralLibrary)
self.tabifyDockWidget(self.dockTimeSeries, self.dockProfiles)
#self.tabifyDockWidget(self.dockTimeSeries, self.dockProfiles)
# self.tabifyDockWidget(self.dockTimeSeries, self.dockLabeling)
area = Qt.RightDockWidgetArea
......@@ -1624,11 +1624,11 @@ class EOTimeSeriesViewer(QgisInterface, QObject):
isinstance(d, (LabelDockWidget, SpectralLibraryDockWidget))]
for d in vectorLayerDocks:
if isinstance(d, LabelDockWidget) and d.vectorLayer().id() == lyr.id():
d.show()
return
elif isinstance(d, SpectralLibraryDockWidget) and d.speclib().id() == lyr.id():
if isinstance(d, LabelDockWidget) and d.vectorLayer().id() == lyr.id() or \
isinstance(d, SpectralLibraryDockWidget) and d.speclib().id() == lyr.id():
d.show()
d.activateWindow()
d.raise_()
return
# 2. create dock widget
......@@ -1649,8 +1649,10 @@ class EOTimeSeriesViewer(QgisInterface, QObject):
self.ui.addDockWidget(Qt.BottomDockWidgetArea, dock)
self.ui.menuPanels.addAction(dock.toggleViewAction())
self.ui.tabifyDockWidget(self.ui.dockTimeSeries, dock)
dock.raise_()
self.ui.tabifyDockWidget(self.ui.dockProfiles, dock)
dock.activateWindow()
QTimer.singleShot(10, lambda d=dock: d.raise_())
def clearLayoutWidgets(self, L):
if L is not None:
......
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