Fix color mode actions in ViewerWidgetMode

Move "options_configure_color_modes" from Okular::Part::setupActions to
Okular::Part::setupViewerActions.

The color mode actions were not properly set in ViewerWidgetMode. Kile would
encounter "ASSERT failure" caused by the Q_ASSERT_X in ColorModeMenu class in
Debug mode.
remotes/origin/work/numberformattest
Luis Kao 4 years ago committed by David Hurka
parent 743b5139ad
commit 5001962112
  1. 10
      part/part.cpp

@ -837,6 +837,11 @@ void Part::setupViewerActions()
pageno->setText(i18n("Page Number"));
pageno->setDefaultWidget(m_pageNumberTool);
ac->addAction(QStringLiteral("page_number"), pageno);
QAction *configureColorModes = new QAction(i18nc("@action", "Configure Color Modes..."), ac);
ac->addAction(QStringLiteral("options_configure_color_modes"), configureColorModes);
configureColorModes->setIcon(QIcon::fromTheme(QStringLiteral("configure")));
connect(configureColorModes, &QAction::triggered, this, &Part::slotAccessibilityPreferences);
}
void Part::setViewerShortcuts()
@ -975,11 +980,6 @@ void Part::setupActions()
eraseDrawingAction->setIcon(QIcon::fromTheme(QStringLiteral("draw-eraser-delete-objects")));
eraseDrawingAction->setEnabled(false);
QAction *configureColorModes = new QAction(i18nc("@action", "Configure Color Modes..."), ac);
ac->addAction(QStringLiteral("options_configure_color_modes"), configureColorModes);
configureColorModes->setIcon(QIcon::fromTheme(QStringLiteral("configure")));
connect(configureColorModes, &QAction::triggered, this, &Part::slotAccessibilityPreferences);
QAction *configureAnnotations = new QAction(i18n("Configure Annotations..."), ac);
ac->addAction(QStringLiteral("options_configure_annotations"), configureAnnotations);
configureAnnotations->setIcon(QIcon::fromTheme(QStringLiteral("configure")));

Loading…
Cancel
Save