Bug report #6125
Restoring print composer panels
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | - | ||
Category: | - | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | fixed |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 15462 |
Description
Issue #6042 was dismissed quickly as a non-issue, but the problem is not solved in the case of 1.8.0 for the mac, where, when panels in Print Composer have been turned off, there does not appear to be a way to retrieve them - right-clicking the menu bar, as works in Windows, does not appear to work on the Mac.
History
#1 Updated by Larry Shaffer over 12 years ago
- File print_composer_panelsback.png added
- File print_composer_bringbackpanels.png added
Damien,
Control-clicking the toolbar (not menu bar) in Mac and selecting the panel that is missing does the trick in both 1.8.0 and latest master branch build for me, and is the same solution provided by Nathan. (see attachments)
Please update missing info for your issue (platform, version, category 'gui', and set the priority to 'normal'), and provide feedback on whether the method described above does not work for you.
I agree that there is not a Mac-like, or straightforward, means of retrieving the missing panels (using a contextual menu to bring back a major part of the ui is a bit obscure). This should be addressed for next version.
Thank you for reporting it.
#2 Updated by Damien O'Grady over 12 years ago
Thank you Larry. Forgive me for not putting the missing details in right away, but I need to contact the student who told me of the problem once again, to get those details.
The problem comes when the Toolbar itself has been turned off. There is then nothing left to right-click to acquire the drop-down menu. Is there a config file somewhere I can access to manually switch the Toolbar back on?
Thanks
Damien
#3 Updated by Larry Shaffer over 12 years ago
Damien,
Using 1.8.0, I hid all panels and the toolbar in Print Composer and could not find a way to retrieve them within QGIS, short of using the Python Console. Doing the following will return the Composer's UI to a default state, i.e. showing all components again:
- Make sure QGIS is not running.
- Open /Users/<user>/Library/Preferences/org.qgis.QGIS.plist in a good .plist or code editor like TextWrangler (free) or BBEdit. If you're using Lion or higher, the Library folder is hidden. To show it, use the Finder's Go->Go to Folder... menu action or hold Option while clicking the Go menu (Library will show up).
- Edit the file by deleting the key/data pair for ComposerUI.state, which may look similar to:
<key>ComposerUI.state</key> <data> AAAA/wAAAAD9AAAAAQAAAAEAAAFOAAAEhPwCAAAAAfwAAAAAAAAEhAAAAAAA////+v// //8CAAAAA/sAAAAeAEMAbwBtAHAAbwBzAGkAdABpAG8AbgBEAG8AYwBrAAAAAAD///// AAAAZgD////7AAAAFgBDAG8AbQBtAGEAbgBkAEQAbwBjAGsAAAAAAP////8AAABoAP// //sAAAAQAEkAdABlAG0ARABvAGMAawAAAAAA/////wAAABoA////AAAHaQAABIQAAAAE AAAABAAAAAgAAAAI/AAAAAEAAAACAAAAAQAAAA4AdABvAG8AbABCAGEAcgAAAAAA//// /wAAAAAAAAAA </data>
Make sure not to leave a blank line in the file where you deleted. Close file. - Relaunch QGIS to test.
Please update missing info for your issue if you can (platform, version, category 'gui', and set the priority to 'normal') and leave it as open, since this is a GUI problem that needs addressed. Thank you.
#4 Updated by Damien O'Grady over 12 years ago
Thank you for your Help, Larry. I am waiting for feedback to confirm that your solution worked. Meanwhile I don't seem to be able to edit details and change status. Am I missing something? Thanks.
#5 Updated by Larry Shaffer over 12 years ago
This is how to edit your issue: http://www.redmine.org/projects/redmine/wiki/RedmineIssues#Updating-an-existing-issue
However, it doesn't seem to be a feature of this version of Redmine, or it's turned off. :^(
#6 Updated by Damien O'Grady over 12 years ago
It is probably a permissions setting...
#7 Updated by mlennert - about 12 years ago
Larry Shaffer wrote:
Damien,
Using 1.8.0, I hid all panels and the toolbar in Print Composer and could not find a way to retrieve them within QGIS, short of using the Python Console. Doing the following will return the Composer's UI to a default state, i.e. showing all components again:
- Make sure QGIS is not running.
- Open /Users/<user>/Library/Preferences/org.qgis.QGIS.plist in a good .plist or code editor like TextWrangler (free) or BBEdit. If you're using Lion or higher, the Library folder is hidden. To show it, use the Finder's Go->Go to Folder... menu action or hold Option while clicking the Go menu (Library will show up).
- Edit the file by deleting the key/data pair for ComposerUI.state, which may look similar to:
[...]
Make sure not to leave a blank line in the file where you deleted. Close file.- Relaunch QGIS to test.
A student of mine has the same problem, but under Ubuntu 12.04 using QGIS 1.8 from ubuntugis-unstable. Is there a similar file that can be edited under Ubuntu ? I have tried completely removing (and purging) all packages containing "qgis" in their name, but when I reinstall QGIS I see the same problem again, i.e. no panels and no toolbar.
Any hints ?
Moritz
#8 Updated by Larry Shaffer about 12 years ago
This is how you can re-show those Composer GUI elements using PyQGIS (should work on all platforms).
- Launch QGIS and open the affected project file.
- Open up the affected print composer. Open only one composer after a clean restart of QGIS.
- Execute the following Python code in QGIS's Python Console:
from PyQt4.QtGui import * cw = qgis.utils.iface.activeComposers()[0].composerWindow() cw.findChild(QToolBar, 'toolBar').show() cw.findChild(QDockWidget, 'CompositionDock').show() cw.findChild(QDockWidget, 'ItemDock').show() cw.findChild(QDockWidget, 'CommandDock').show()
- Quit QGIS. After restart of QGIS, all Composers, including new ones, should have all panels and the toolbar shown.
If you have more than one composer window to fix, and don't want to restart QGIS, open all of them and use this code instead:
from PyQt4.QtGui import * actcs = qgis.utils.iface.activeComposers() for actc in actcs: cw = actc.composerWindow() cw.findChild(QToolBar, 'toolBar').show() cw.findChild(QDockWidget, 'CompositionDock').show() cw.findChild(QDockWidget, 'ItemDock').show() cw.findChild(QDockWidget, 'CommandDock').show()
#9 Updated by Larry Shaffer about 12 years ago
Here's an even better solution.
- Open project
- Execute the following in Python Console
from PyQt4.QtGui import * actcs = qgis.utils.iface.activeComposers() for actc in actcs: cw = actc.composerWindow() mb = cw.menuBar() wm = mb.findChild(QMenu, 'wmenu') if not wm: wm = mb.addMenu('Window') wm.setObjectName('wmenu') wm.addActions(cw.createPopupMenu().actions())
All Composer windows now have a menu named 'Window' which lists the toolbar and dock widgets (same as contextual menu on tool bar). You can hide/show the widgets as if it was coded that way to begin with. No need to open Composer windows first.
You can execute the code as many times as needed. It will not keep adding new 'Window' menus.
#10 Updated by Larry Shaffer about 12 years ago
Added to master with commit c928868, as per the same way they are displayed in main app (under View menu and separated by widget type).
Issue should be closed.
#11 Updated by Giovanni Manghi about 12 years ago
- Status changed from Open to Feedback
Issue should be closed.
can the original reporter please test and eventually close the ticket? thanks in advance.
#12 Updated by Paolo Cavallini about 12 years ago
- Target version set to Version 2.0.0
#13 Updated by Giovanni Manghi about 12 years ago
- Resolution set to fixed
- Status changed from Feedback to Closed
Giovanni Manghi wrote:
Issue should be closed.
can the original reporter please test and eventually close the ticket? thanks in advance.
closing for lack of feedback and as it should be fixed.