Commit 6494e071 authored by Michel Ludwig's avatar Michel Ludwig

Also update the state of the menu 'view_orientation' correctly.

parent 1adb8cc7
......@@ -1327,6 +1327,12 @@ bool Part::closeUrl()
return r;
}
void Part::guiActivateEvent(KParts::GUIActivateEvent *event)
{
updateViewActions();
KParts::ReadOnlyPart::guiActivateEvent(event);
}
void Part::close()
{
......@@ -1531,10 +1537,10 @@ void Part::updateViewActions()
if ( factory() )
{
QWidget *menu = factory()->container("menu_okular_part_viewer", this);
if( menu )
{
menu->setEnabled( opened );
}
if (menu) menu->setEnabled( opened );
menu = factory()->container("view_orientation", this);
if (menu) menu->setEnabled( opened );
}
emit(viewerMenuStateChange( opened ));
......
......@@ -42,6 +42,7 @@ class KSelectAction;
class KAboutData;
class KTemporaryFile;
class KAction;
namespace KParts { class GUIActivateEvent; }
class FindBar;
class ThumbnailList;
......@@ -135,6 +136,7 @@ class Part : public KParts::ReadOnlyPart, public Okular::DocumentObserver, publi
bool openFile();
bool openUrl(const KUrl &url);
bool closeUrl();
void guiActivateEvent(KParts::GUIActivateEvent *event);
protected slots:
// connected to actions
......
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