Commit 525e706f authored by Anatoly Mihalchenko's avatar Anatoly Mihalchenko

Part of fix for ticket 409.

parent 71d9a71a
...@@ -1057,3 +1057,8 @@ QRect UBBoardPaletteManager::GetFreeRectGlobalCoords() const ...@@ -1057,3 +1057,8 @@ QRect UBBoardPaletteManager::GetFreeRectGlobalCoords() const
} }
return QRect(topLeft, bottomRight); return QRect(topLeft, bottomRight);
} }
void UBBoardPaletteManager::ForceTeacherBarToSaveData()
{
mpTeacherBarWidget->saveContent();
}
...@@ -66,6 +66,7 @@ class UBBoardPaletteManager : public QObject ...@@ -66,6 +66,7 @@ class UBBoardPaletteManager : public QObject
void startDownloads(); void startDownloads();
void stopDownloads(); void stopDownloads();
QRect GetFreeRectGlobalCoords() const; QRect GetFreeRectGlobalCoords() const;
void ForceTeacherBarToSaveData();
signals: signals:
void connectToDocController(); void connectToDocController();
......
...@@ -534,7 +534,10 @@ void UBDocumentController::duplicateSelectedItem() ...@@ -534,7 +534,10 @@ void UBDocumentController::duplicateSelectedItem()
if (UBApplication::applicationController->displayMode() != UBApplicationController::Document) if (UBApplication::applicationController->displayMode() != UBApplicationController::Document)
return; return;
if (mSelectionType == Page) UBBoardPaletteManager* paletteMan = UBApplication::boardController->paletteManager();
//necessary to save active scene teacher bar data, if the scene didn't happen to be changed
if(paletteMan) paletteMan->ForceTeacherBarToSaveData();
if (mSelectionType == Page)
{ {
QList<QGraphicsItem*> selectedItems = mDocumentUI->thumbnailWidget->selectedItems(); QList<QGraphicsItem*> selectedItems = mDocumentUI->thumbnailWidget->selectedItems();
QList<int> selectedSceneIndexes; QList<int> selectedSceneIndexes;
......
...@@ -46,9 +46,10 @@ public: ...@@ -46,9 +46,10 @@ public:
UBTeacherBarWidget(QWidget* parent=0, const char* name="UBTeacherBarWidget"); UBTeacherBarWidget(QWidget* parent=0, const char* name="UBTeacherBarWidget");
~UBTeacherBarWidget(); ~UBTeacherBarWidget();
private slots: public slots:
void saveContent(); void saveContent();
void loadContent(); void loadContent();
private slots:
void onValueChanged(); void onValueChanged();
void onTitleTextChanged(const QString& text); void onTitleTextChanged(const QString& text);
void onEquipmentTextChanged(const QString& text); void onEquipmentTextChanged(const QString& text);
......
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