fixed issue 882

preferencesAboutTextFull
Claudio Valerio 12 years ago
parent 523d2852ef
commit e0324211a9
  1. 13
      src/gui/UBDockPalette.cpp
  2. 3
      src/gui/UBDockPalette.h
  3. 8
      src/gui/UBLeftPalette.cpp
  4. 3
      src/gui/UBLeftPalette.h
  5. 1
      src/gui/UBTeacherGuideWidget.cpp

@ -17,12 +17,16 @@
#include <QPainterPath>
#include "UBDockPalette.h"
#include "core/UBSettings.h"
#include "frameworks/UBPlatformUtils.h"
#include "core/UBSettings.h"
#include "core/UBApplication.h"
#include "core/UBPreferencesController.h"
#include "core/UBDownloadManager.h"
#include "board/UBBoardController.h"
#include "core/memcheck.h"
/**
@ -79,6 +83,8 @@ UBDockPalette::UBDockPalette(eUBDockPaletteType paletteType, QWidget *parent, co
onToolbarPosUpdated();
connect(UBSettings::settings()->appToolBarPositionedAtTop, SIGNAL(changed(QVariant)), this, SLOT(onToolbarPosUpdated()));
connect(UBDownloadManager::downloadManager(), SIGNAL(allDownloadsFinished()), this, SLOT(onAllDownloadsFinished()));
connect(UBApplication::boardController,SIGNAL(documentSet(UBDocumentProxy*)),this,SLOT(onDocumentSet(UBDocumentProxy*)));
}
/**
@ -98,6 +104,11 @@ UBDockPalette::~UBDockPalette()
}
}
void UBDockPalette::onDocumentSet(UBDocumentProxy* documentProxy)
{
Q_UNUSED(documentProxy);
}
/**
* \brief Get the current orientation
* @return the current orientation

@ -15,6 +15,8 @@
#ifndef UBDOCKPALETTE_H
#define UBDOCKPALETTE_H
class UBDocumentProxy;
#include <QWidget>
#include <QMouseEvent>
#include <QBrush>
@ -131,6 +133,7 @@ public slots:
void onShowTabWidget(UBDockPaletteWidget* widget);
void onHideTabWidget(UBDockPaletteWidget* widget);
void onAllDownloadsFinished();
virtual void onDocumentSet(UBDocumentProxy* documentProxy);
protected:
virtual int border();

@ -51,6 +51,14 @@ UBLeftPalette::~UBLeftPalette()
}
void UBLeftPalette::onDocumentSet(UBDocumentProxy* documentProxy)
{
//This is necessary to force the teacher guide to be showed in priority each time a document is set
if(documentProxy && UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool())
mLastOpenedTabForMode.insert(eUBDockPaletteWidget_BOARD, 1);
}
/**
* \brief Update the maximum width
*/

@ -25,6 +25,9 @@ public:
bool switchMode(eUBDockPaletteWidgetMode mode);
public slots:
void onDocumentSet(UBDocumentProxy* documentProxy);
protected:
void updateMaxWidth();
void resizeEvent(QResizeEvent *event);

@ -1149,7 +1149,6 @@ void UBTeacherGuideWidget::onActiveSceneChanged()
mpPageZeroWidget->switchToMode(tUBTGZeroPageMode_EDITION);
setCurrentWidget(mpPageZeroWidget);
}
else{
if(mpEditionWidget->isModified()){

Loading…
Cancel
Save