Part of fix for ticket 409.

preferencesAboutTextFull
Anatoly Mihalchenko 13 years ago
parent 71d9a71a26
commit 525e706fda
  1. 5
      src/board/UBBoardPaletteManager.cpp
  2. 1
      src/board/UBBoardPaletteManager.h
  3. 5
      src/document/UBDocumentController.cpp
  4. 3
      src/gui/UBTeacherBarWidget.h

@ -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
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()
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:
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);

Loading…
Cancel
Save