Skip to content

Commit

Permalink
disable print from welcome view
Browse files Browse the repository at this point in the history
  • Loading branch information
irascible committed Dec 16, 2013
1 parent 96b55bd commit 743f0a6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mainwindow/mainwindow_export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ void MainWindow::initNames()
}

void MainWindow::print() {
if (m_currentGraphicsView == NULL) return;

#ifndef QT_NO_PRINTER
QPrinter printer(QPrinter::HighResolution);

Expand Down Expand Up @@ -621,6 +623,8 @@ void MainWindow::exportAux(QString fileName, QImage::Format format, int quality,
}

void MainWindow::printAux(QPrinter &printer, bool removeBackground, bool paginate) {
if (m_currentGraphicsView == NULL) return;

int res = printer.resolution();
double scale2 = res / GraphicsUtils::SVGDPI;
DebugDialog::debug(QString("p.w:%1 p.h:%2 pager.w:%3 pager.h:%4 paperr.w:%5 paperr.h:%6 source.w:%7 source.h:%8")
Expand Down
4 changes: 4 additions & 0 deletions src/mainwindow/mainwindow_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -805,10 +805,14 @@ void MainWindow::createOpenRecentMenu() {
}

void MainWindow::updateFileMenu() {
m_printAct->setEnabled(m_currentGraphicsView != NULL);

updateRecentFileActions();
m_orderFabAct->setEnabled(true);

m_revertAct->setEnabled(m_undoStack->canUndo());


}

void MainWindow::updateRecentFileActions() {
Expand Down

0 comments on commit 743f0a6

Please sign in to comment.