Commit b5f0e0c5 authored by shibakaneki's avatar shibakaneki

Fixed issue Sankore-24

parent be6de520
......@@ -55,6 +55,7 @@ UBDocumentController::UBDocumentController(UBMainWindow* mainWindow)
{
setupViews();
setupToolbar();
connect(this, SIGNAL(exportDone()), mMainWindow, SLOT(onExportDone()));
}
......@@ -818,6 +819,7 @@ void UBDocumentController::exportDocument()
if (proxy)
{
selectedExportAdaptor->persist(proxy);
emit exportDone();
}
else
{
......
......@@ -37,6 +37,7 @@ class UBDocumentController : public QObject
signals:
void refreshThumbnails();
void exportDone();
public slots:
void createNewDocument();
......
......@@ -102,3 +102,17 @@ void UBMainWindow::keyPressEvent(QKeyEvent *event)
}
*/
}
void UBMainWindow::onExportDone()
{
// HACK : When opening the file save dialog during the document exportation,
// some buttons of the toolbar become disabled without any reason. We
// re-enable them here.
actionExport->setEnabled(true);
actionNewDocument->setEnabled(true);
actionRename->setEnabled(true);
actionDuplicate->setEnabled(true);
actionDelete->setEnabled(true);
actionOpen->setEnabled(true);
actionDocumentAdd->setEnabled(true);
}
......@@ -12,6 +12,7 @@ class QStackedLayout;
class UBMainWindow : public QMainWindow, public Ui::MainWindow
{
Q_OBJECT
public:
UBMainWindow(QWidget *parent = 0, Qt::WindowFlags flags = 0);
......@@ -26,6 +27,9 @@ class UBMainWindow : public QMainWindow, public Ui::MainWindow
void addDocumentsWidget(QWidget *pWidget);
void switchToDocumentsWidget();
public slots:
void onExportDone();
protected:
virtual void keyPressEvent(QKeyEvent *event);
......
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