Fix for a Qt 5 regression that caused the Copy to Library right click menu to be empty on OS X. Fixes #1360069 [Missing "Copy to Library" submenu](https://bugs.launchpad.net/calibre/+bug/1360069)

This commit is contained in:
Kovid Goyal 2014-08-22 11:02:18 +05:30
parent 3f57f71c5a
commit 4debe239b1

View File

@ -15,6 +15,7 @@ from PyQt5.Qt import (
QToolButton, QDialog, QGridLayout, QIcon, QLabel, QDialogButtonBox, QApplication,
QFormLayout, QCheckBox, QWidget, QScrollArea, QVBoxLayout, Qt, QListWidgetItem, QListWidget)
from calibre.constants import isosx
from calibre.gui2.actions import InterfaceAction
from calibre.gui2 import (error_dialog, Dispatcher, warning_dialog, gprefs,
info_dialog, choose_dir)
@ -359,6 +360,9 @@ class CopyToLibraryAction(InterfaceAction):
if len(locations) <= 50:
self.menu.addAction(_('Choose library by path...'), self.choose_library)
self.qaction.setVisible(bool(locations))
if isosx:
# The cloned action has to have its menu updated
self.qaction.changed.emit()
def choose_library(self):
d = ChooseLibrary(self.gui)