Instead of calling StatusBar::updateUsingEditor(Editor*), now the StatusBar
is a ContextObserver that observe changes in the active doc::Site. The
Editor notifies a ActiveSiteChange event when the active frame/layer
is changed.
Fix#657
This fixes a problem creating interpolation between random
oldX/Width values and x/width fields. I've added some special values
in the initialization of a Tab to know if we are using uninitialized
values oldX/Width/x/width values in the animation.
Related to bug found in #656. In this way, if the UI is enabled,
the active document is != null only if there is an active view for it.
Anyway, in batch mode we can potentially have a lot of bugs. There are
several UI commands that think that active view != null (and
current_editor != null) when the active document != null.
Now the file name field is an editable ComboBox, so we don't
autocomplete/modify the text inside the entry box.
With this commit we modified the editable ComboBox behavior too:
* When the ListBox is shown, the focus remain in the Entry field (now
the ListBox cannot have the focus when the ComboBox is editable).
* When Up/down keys are received by the Entry, they are given to the
ListBox to change the selected item. But the focus returns to the
Entry anyway.
When a combobox popup is open, it creates a new non-foreground top window
(which is sibling of the window where the combobox widget is). When the
popup receives a key press, and it doesn't use it, the key is passed to
its parent (a ui::Manager), and then the latter has to process it.
Before this commit, CustomizedGuiManager::onProcessMessage() was
filtering shortcuts for foreground window, but it was working only
when the key was pressed in the foreground window itself (not when a
combination of foreground and background windows were open). Now the
filter is done in Manager::onProcessMessage() (which returns true,
i.e. key was used, for every pressed key when a foreground window
is found in its children hierarchy).
We replace brush slots until the user presses its keyboard shortcut, which
means he is interested in reusing the brush. In this way, if we want to
keep a brush, we can press Ctrl+B, select the brush area, and then Alt+1
to keep the first brush, then the next brush slot will be used/replaced
until Alt+2 is pressed, etc.
When we create a CompressedImage from a Brush image, we want to know what
pixels are != the mask color, just to generate the PointShape (we don't
care the specific color of the scaneline/each pixel, that information is
used in the "ink processing" step).