Commit 5bdeae56 authored by Claudio Valerio's avatar Claudio Valerio

fixed issue 901

parent 0aa62126
...@@ -529,6 +529,7 @@ void UBDockPalette::setVisible(bool visible) ...@@ -529,6 +529,7 @@ void UBDockPalette::setVisible(bool visible)
bool UBDockPalette::switchMode(eUBDockPaletteWidgetMode mode) bool UBDockPalette::switchMode(eUBDockPaletteWidgetMode mode)
{ {
mLastOpenedTabForMode.insert(mCurrentMode, mpStackWidget->currentIndex());
mCurrentMode = mode; mCurrentMode = mode;
bool hasVisibleElements = false; bool hasVisibleElements = false;
//-------------------------------// //-------------------------------//
...@@ -552,7 +553,7 @@ bool UBDockPalette::switchMode(eUBDockPaletteWidgetMode mode) ...@@ -552,7 +553,7 @@ bool UBDockPalette::switchMode(eUBDockPaletteWidgetMode mode)
//-------------------------------// //-------------------------------//
if(mRegisteredWidgets.size() > 0) if(mRegisteredWidgets.size() > 0)
showTabWidget(0); showTabWidget(mLastOpenedTabForMode.value(mCurrentMode));
update(); update();
......
...@@ -176,6 +176,8 @@ protected: ...@@ -176,6 +176,8 @@ protected:
QVector<UBDockPaletteWidget*> mRegisteredWidgets; QVector<UBDockPaletteWidget*> mRegisteredWidgets;
/** The current tab widget */ /** The current tab widget */
QString mCrntTabWidget; QString mCrntTabWidget;
/** Last opened tab index depending on mode */
QMap<eUBDockPaletteWidgetMode,int> mLastOpenedTabForMode;
private slots: private slots:
void onToolbarPosUpdated(); void onToolbarPosUpdated();
......
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