Commit graph

295 commits

Author SHA1 Message Date
Robin Gareus
b3722f7063 consistent use of context-menu popups 2017-03-16 02:36:48 +01:00
Paul Davis
6a823402e6 This turns out to have been a band-aid over a deeper issue in libcanvas, fixed
in commit 49422aa89

Revert "fix an issue with selection rects not being redrawn correctly"

This reverts commit fa1a7ae9b9.
2017-01-25 16:54:48 +01:00
Paul Davis
fa1a7ae9b9 fix an issue with selection rects not being redrawn correctly 2017-01-25 16:47:42 +01:00
nick_m
37e858da7d only update GhostEvents on visible trackviews.
- this requires that MidiGhostRegion::update_contents_height()
	  also controls visibility.
2016-12-23 02:55:51 +11:00
Paul Davis
37233fe92f TimeAxisView::set_selected() needs to call AxisView::set_selected() 2016-09-27 14:59:32 -05:00
Paul Davis
0ab81183c0 don't show empty time axis view context menus 2016-08-18 08:16:31 -04:00
Robin Gareus
822810b88f the endless quest to plug memory leaks -- episode 379 2016-07-25 17:38:59 +02:00
Paul Davis
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
Paul Davis
da7d7f9502 many changes associated with rationalizing selection flow 2016-07-06 13:39:10 -04:00
Paul Davis
01812f53c3 use, or mostly use PresentationInfo for selection status of Routes.
Needs extension to Surfaces, replacing GuiSelectionChanged signal concept
2016-06-05 20:50:57 -04:00
Paul Davis
c31435b474 RouteUI is now also derived from SessionHandlePtr but NOT AxisView. Fix initialization.
Only "most derived" classes can initialize virtual base classes (SessionHandlePtr)
2016-06-05 16:33:01 -04:00
Paul Davis
a98015e11a NO-OP: add blank line to make comments clearer 2016-06-03 16:12:32 -04:00
Paul Davis
0d999ea4ec remove un-used name_hbox widget from TimeAxisView 2016-06-01 21:57:43 -04:00
Paul Davis
43b6a7aca3 remove unneeded widget style definition 2016-06-01 21:57:43 -04:00
Paul Davis
428ed8ae1b stop playing silly games with widget packing when editing a route name in the edito
Use a FloatingTextEntry instead. All clever functionality from previous
implementation has been retained.
2016-05-31 15:30:44 -04:00
Paul Davis
670e79f7d1 do not accidentally try to select VCA time axis views for context clicks or other conditional ops 2016-05-31 15:30:44 -04:00
Paul Davis
e626db22a0 make selectability of a TimeAxisView be overridable 2016-05-31 15:30:44 -04:00
Paul Davis
63f50b1fc5 no-op: move comment to make scope more clear 2016-05-31 15:30:44 -04:00
Paul Davis
a12ce428d0 fix wierd TimeAxisView initial attachment for the name hbox 2016-05-31 15:30:44 -04:00
Paul Davis
d4070a7e3e pre-size TimeAxisView controls_table to something more like the correct rows x cols 2016-05-31 15:30:44 -04:00
Paul Davis
653ae4acd6 universal change in the design of the way Route/Track controls are designed and used. The controls now own their own state, rather than proxy for state in their owners.
Massive changes all over the code to accomodate this. Many things are not finished. Consider this a backup safety commit
2016-05-31 15:30:40 -04:00
Robin Gareus
d5050cd0f4 mark initial TAV as hidden to speed up initial display.
This prevents an extra call to "redisplay" from TAV::hide() which
triggers handle_gui_changes.
Visible TAVs are positioned using show_at() which unsets _hidden.
2016-05-03 14:27:42 +02:00
Julien ROGER
1fbe4253aa Fix 6609: Right-click in active track name box crashes
When right-clicking in the text entry, popup menu grabs focus. Consequently, the "focus out" handler is called, destroys the text entry and replaces it by the label name of the track.
When menu pops up, it tries to access to a widget no longer available.
2016-02-13 12:30:31 +10:00
Tim Mayberry
b074ff0dd5 Remove GhostRegion::CatchDeletion signal to reduce session close times
Currently when a GhostRegion is deleted by its "parent" RegionView it emits the
static GhostRegion::CatchDeletion signal which is connected to the
RegionView::remove_ghost method of every RegionView instance.

With a static GhostRegion::CatchDeletion signal a particular test session
causes 31 Million calls of RegionView::remove_ghost on Session deletion and the
session takes 70 seconds to close with a debug build.

The lifetime of a ghost region is tied to both the TimeAxisView(TAV) and
RegionView(RV) in that when a RegionView is deleted all GhostRegion instances
associated with the RegionView should be deleted or when a TimeAxisView is
deleted all ghost regions that are contained in the view should be deleted.

This means that there needs to be notification between GhostRegion and both
classes. Instead of using a signal for this as we know there are only two
listeners and GhostRegion already holds a reference to the TimeAxisView, also
take a reference to the parent RegionView in the GhostRegion constructor and
use it to notify the RegionView when GhostRegion destructor is called so it can
drop any references it holds.

Using a direct function call in the GhostRegion destructor to notify the
TimeAxisView and RegionView "parents" brings the unload/close time down for the
test session from 70 seconds to 4.5 seconds.

The GhostRegion also references canvas items that are added to the TimeAxisView
canvas group or at least a canvas group that it manages. So when the
TimeAxisView is destroyed and the canvas group that is the parent of those
items is destroyed, the GhostRegion's canvas items will also be
deleted/destroyed by the parent canvas item/group. This means the GhostRegions
must be destroyed when the TimeAxisView they are contained in is destroyed or
there will be dangling references to canvas items that have already been
deleted and trying to delete them again will be bad.
2015-10-22 11:51:03 -04:00
Robin Gareus
22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
Paul Davis
4dc63966f0 globally remove all trailing whitespace from ardour code base.
Paul Davis was responsible for introducing almost all of this.
2015-10-04 14:51:05 -04:00
Tim Mayberry
1d42ed077e Use ARDOUR_UI_UTILS::set_tooltip rather than via ARDOUR_UI::set_tip
This removes the direct dependence on ARDOUR_UI/Gtk_UI for setting
tooltips. Removes inclusion of ardour_ui.h from 16 files.
2015-09-16 16:55:17 -04:00
Tim Mayberry
6b019a4953 Move UIConfiguration Singleton into UIConfiguration header
This removes the direct dependence on ardour_ui.h from 39 files
2015-09-16 16:55:17 -04:00
Tim Mayberry
45d487f16e Move ARDOUR_UI::ui_scale into UIConfiguration class 2015-09-16 16:55:17 -04:00
Tim Mayberry
fc1e7dbb55 Move DPIReset and ColorsChanged signals into UIConfiguration 2015-09-16 16:55:17 -04:00
Paul Davis
9c6a821c67 prevent crash when using WM close button on "new route name contains bad chars" dialog.
The dialog would be created twice, once because the user hit enter etc. to indicate they were done editing,
and once because focus left the name text entry, also indicate the end of editing. We now note that we're
already processing the end of a name edit, and do nothing in that case
2015-05-27 19:34:11 -04:00
Robin Gareus
b38ab89d92 clean up GUI scaling 2015-04-22 21:40:43 +02:00
Robin Gareus
0c468dc379 add more contexts for SLA. 2015-04-05 00:44:03 +02:00
Robin Gareus
f1ce87a699 add API to select TAV height mode.
preparation for further Summary and Number of visible
track count fixes.

* “Only Self”: don’t resize child-views (old default)
* “Total Height”: distribute height equally among 
   all visible child [automation] lanes
* “Height per Lane”: given height should be applied
   to all sub-views.
2015-03-19 21:47:34 +01:00
Paul Davis
11cfdd4c6d remove use of TimeRectangle 2015-02-11 21:59:38 -05:00
Ben Loftis
9e0cd98ad4 fix select-all-regions-within (it used to select everything overlapped) 2015-01-09 12:21:10 -06:00
Robin Gareus
c14f6c59db apply font-scale to overall layout (rulers, track-header) - fixes #6088 2014-12-28 15:01:49 +01:00
Robin Gareus
21f5859981 fix double-free/crash at session close 2014-12-19 21:30:22 +01:00
Paul Davis
2145fd2973 next 2 modifiers 2014-12-15 10:46:15 -05:00
Paul Davis
56ca52651e fix up requested color names everywhere.
Thank <deity> for emacs ... space-uncamelcase-word-at-point FTW
2014-12-14 16:15:38 -05:00
Paul Davis
48a7a11974 initial pass to replace all UIConfiguration::get_XXXXXX() calls with UIConfiguration::color(name).
IMPORTANT: names have not been downcased and spaced yet, so many colors are not found
2014-12-14 12:27:07 -05:00
David Robillard
89be7ae58c Fix crash on quit when in a non-route time axis. 2014-12-06 22:43:06 -05:00
David Robillard
09bd88c9df Fix crash when resizing a track quickly.
Triggered by resize drag an automation track very quickly upwards to shrink it
to the minimum.  Caused by unsigned integer underflow.
2014-12-06 22:43:06 -05:00
Robin Gareus
6b3a8915f3 add abort() to non-reached code
This cleans up a lot of false-positives in static analysis
and also helps compilers to optimize code paths in general.
(tagging the fatal stingstream operator as ‘noreturn’ is
far less trivial)
2014-11-14 11:30:08 +01:00
Paul Davis
4260d0ca0e use new canvas colors header as necessary 2014-11-07 14:24:27 -05:00
Paul Davis
555ceba876 various positional fixes for TimeAxisView, including moving the separator line to the bottom, and keeping it in the same coordinate space as the TAV group 2014-11-05 19:45:23 -05:00
Paul Davis
f1e6b28ab7 use ArdourCanvas::TimeRectangle for regions, notes, markers 2014-11-03 21:48:08 -05:00
Paul Davis
90825340c9 move start of a time axis view back to 0.0 on the x-axis, not 1.0 2014-11-03 21:48:08 -05:00
Robin Gareus
45b7a03b7b retain selection on track-height change 2014-11-01 16:54:52 +01:00
Paul Davis
ba4d1cd1c1 remove "canvasvar_" from all functions related to obtaining values from ARDOUR_UI::config() 2014-10-21 22:58:58 -04:00