Skip to content

Commit

Permalink
remove Continuous from View/Grid (#3968)
Browse files Browse the repository at this point in the history
  • Loading branch information
octaeder authored Jan 30, 2025
1 parent c37d978 commit ebb3a05
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/pdfviewer/PDFDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1589,9 +1589,9 @@ void PDFWidget::contextMenuEvent(QContextMenuEvent *event)
usingTool = kNone;
}

if (pdfDoc && pdfDoc->menuShow && pdfDoc->menuGrid) {
if (pdfDoc && pdfDoc->menuShow && pdfDoc->menuGridContext) {
menu.addSeparator();
menu.addMenu(pdfDoc->menuGrid);
menu.addMenu(pdfDoc->menuGridContext);
menu.addMenu(pdfDoc->menuShow);
}

Expand Down Expand Up @@ -3015,10 +3015,11 @@ void PDFDocument::setupMenus(bool embedded)
menuEdit_2=configManager->newManagedMenu(menuroot,menubar,"pdf/edit",QApplication::translate("PDFDocument", "&Edit"));
menuView=configManager->newManagedMenu(menuroot,menubar,"pdf/view",QApplication::translate("PDFDocument", "&View"));
menuGrid=configManager->newManagedMenu(menuView,nullptr,"pdf/view/grid",QApplication::translate("PDFDocument", "Grid"));
menuGridContext=configManager->newManagedMenu(menuroot,nullptr,"pdf/context/grid",QApplication::translate("PDFDocument", "Grid"));
menuWindow=configManager->newManagedMenu(menuroot,menubar,"pdf/window",QApplication::translate("PDFDocument", "&Window"));
menuEdit=configManager->newManagedMenu(menuroot,menubar,"pdf/config",QApplication::translate("PDFDocument", "&Configure"));
menuHelp=configManager->newManagedMenu(menuroot,menubar,"pdf/help",QApplication::translate("PDFDocument", "&Help"));
menus<<menuFile<<menuEdit<<menuEdit_2<<menuGrid<<menuHelp<<menuWindow<<menuView; // housekeeping for later removal
menus<<menuFile<<menuEdit<<menuEdit_2<<menuGrid<<menuGridContext<<menuHelp<<menuWindow<<menuView; // housekeeping for later removal

if(!embedded)
setMenuBar(menubar);
Expand Down Expand Up @@ -3100,15 +3101,19 @@ void PDFDocument::setupMenus(bool embedded)
a->setCheckable(true);
a->setChecked(first);
actionGroupGrid->addAction(a);
menuGridContext->addAction(a);
first=false;
}
actionCustom=configManager->newManagedAction(menuroot,menuGrid, "gridCustom", tr("Custom..."), this, SLOT(setGrid()), QList<QKeySequence>());
actionCustom->setProperty("grid","xx");
actionCustom->setCheckable(true);
actionGroupGrid->addAction(actionCustom);
menuGridContext->addAction(actionCustom);
menuGrid->addSeparator();
menuGridContext->addSeparator();
actionSinglePageStep=configManager->newManagedAction(menuroot,menuGrid, "singlePageStep", tr("Single Page Step"), pdfWidget, SLOT(setSinglePageStep(bool)), QList<QKeySequence>());
menuGrid->addAction(actionContinuous);
menuGridContext->addAction(actionSinglePageStep);
menuGridContext->addAction(actionContinuous);
menuWindow->addAction(menuShow->menuAction());
#if (QT_VERSION > 0x050a00) && (defined(Q_OS_MAC))
actionCloseElement=configManager->newManagedAction(menuroot,menuWindow, "closeElement", tr("&Close something"), this, SLOT(closeElement()), QList<QKeySequence>()); // osx work around
Expand Down
1 change: 1 addition & 0 deletions src/pdfviewer/PDFDocument.h
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,7 @@ private slots:
QTimer *toolBarTimer;
public:
QMenu *menuGrid = nullptr;
QMenu *menuGridContext = nullptr;
QMenu *menuShow = nullptr;
private:
QMenu *menuEdit_2;
Expand Down

0 comments on commit ebb3a05

Please # to comment.