onboard error

Asked by Aditya

hi
i have been working on onboard for past 3 days.
what i found was when in any layout i go to other panel/layer..the click event prints but it takes me to the main panel(layer 0).
This might be the result of tweaks i did,but was wondering if it was due to its unmatured nature.

Question information

Language:
English Edit question
Status:
Solved
For:
Onboard Edit question
Assignee:
No assignee Edit question
Solved by:
Aditya
Solved:
Last query:
Last reply:
Revision history for this message
Francesco Fumanti (frafu) said :
#1

Hi,

Onboard behaves that way by design. If the layout supports it, it is possible to lock a layer by performing a double click on the layer button when switching the layer. (To support double click, the target layer button has to be defined for both layers in the .onboard file.)

On the other hand, we are aware of the problem that can be caused by the automatic switch to layer 0 and have the intention to do something about it; this might be a new attribute for the key tag to let Onboard know to not switch layer when the corresponding button of that key is clicked.

Cheers

Revision history for this message
Aditya (aditya-phatak) said :
#2

Hi
I found out that commenting this piece of code will do it

  # switch to layer 0 on (almost) any key release
# if not key.is_layer_button() and \
# not key.id in ["move", "showclick"] and \
# not self.editing_snippet:
# if self.active_layer_index != 0 and not self._layer_locked:
# self.active_layer_index = 0
# self.update_visible_layers()
# needs_layout_update = True
# self.redraw()

        # punctuation assistance and collapse corrections
# WordSuggestions.on_after_key_release(self, key)

# return needs_layout_update

Will dis have any affect on any other part?
Also what is the use of it when i have button/key to switch to d main layer/panel0

Revision history for this message
Aditya (aditya-phatak) said :
#3

Thanku..solved