View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0003527 | ardour | bugs | public | 2010-11-09 00:04 | 2020-04-19 20:14 |
| Reporter | lincoln | Assigned To | cth103 | ||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Target Version | 3.0-beta1 | ||||
| Summary | 0003527: [PATCH] Vertical zooming using the summary view can make tracks too small | ||||
| Description | Zooming by using the edit summary box may result in some tracks becoming smaller than the minimum size allowed when handling the tracks using the track resizer. The attached patch goes some way to making the behaviour better overall. | ||||
| Tags | No tags attached. | ||||
|
2010-11-09 00:04
|
editor-summary-yaxis-zoom.patch (1,743 bytes)
Index: gtk2_ardour/editor_summary.cc
===================================================================
--- gtk2_ardour/editor_summary.cc (revision 7980)
+++ gtk2_ardour/editor_summary.cc (working copy)
@@ -26,6 +26,7 @@
#include "region_view.h"
#include "rgb_macros.h"
#include "keyboard.h"
+#include "editor_routes.h"
using namespace std;
using namespace ARDOUR;
@@ -666,12 +667,15 @@
pair<double, double> yc = y;
double total_height = 0;
double scale_height = 0;
+
+ _editor->_routes->suspend_redisplay ();
+
for (TrackViewList::const_iterator i = _editor->track_views.begin(); i != _editor->track_views.end(); ++i) {
if ((*i)->hidden()) {
continue;
}
-
+
double const h = (*i)->effective_height ();
if (yc.first >= 0 && yc.first < _track_height) {
@@ -687,7 +691,7 @@
yc.first -= _track_height;
yc.second -= _track_height;
}
-
+
/* hence required scale factor of the complete tracks to fit the required y range */
double const scale = ((_editor->canvas_height() - _editor->get_canvas_timebars_vsize()) - (total_height - scale_height)) / scale_height;
@@ -701,6 +705,17 @@
continue;
}
+ if((*i)->effective_height() <= TimeAxisView::preset_height (HeightSmall)
+ && ((*i)->effective_height() * scale) <= TimeAxisView::preset_height (HeightSmall)){
+
+ (*i)->set_height (TimeAxisView::preset_height (HeightSmall));
+
+ yc.first -= _track_height;
+ yc.second -= _track_height;
+
+ continue;
+ }
+
if (yc.first < 0 && yc.second > _track_height) {
(*i)->set_height ((*i)->effective_height() * scale);
}
@@ -709,6 +724,8 @@
yc.second -= _track_height;
}
+ _editor->_routes->resume_redisplay ();
+
set_editor_y (y.first);
}
|
|
2010-11-09 10:19
|
time-axis-view-clamp-min-height.patch (425 bytes)
Index: gtk2_ardour/time_axis_view.cc
===================================================================
--- gtk2_ardour/time_axis_view.cc (revision 7983)
+++ gtk2_ardour/time_axis_view.cc (working copy)
@@ -429,6 +429,10 @@
void
TimeAxisView::set_height(uint32_t h)
{
+ if (height < preset_height (HeightSmall)){
+ h = preset_height (HeightSmall);
+ }
+
time_axis_vbox.property_height_request () = h;
height = h;
|
|
|
Hi How does the if((*i)->effective_height() <= TimeAxisView::preset_height (HeightSmall) ever trip if the patch to clamp TimeAxisView heights is also used? |
|
|
Good point, will test it out and resubmit. |
|
2010-11-10 21:22
|
editor-summary-yaxis-zoom-2.patch (1,660 bytes)
Index: gtk2_ardour/editor_summary.cc
===================================================================
--- gtk2_ardour/editor_summary.cc (revision 7993)
+++ gtk2_ardour/editor_summary.cc (working copy)
@@ -26,6 +26,7 @@
#include "region_view.h"
#include "rgb_macros.h"
#include "keyboard.h"
+#include "editor_routes.h"
using namespace std;
using namespace ARDOUR;
@@ -666,12 +667,15 @@
pair<double, double> yc = y;
double total_height = 0;
double scale_height = 0;
+
+ _editor->_routes->suspend_redisplay ();
+
for (TrackViewList::const_iterator i = _editor->track_views.begin(); i != _editor->track_views.end(); ++i) {
if ((*i)->hidden()) {
continue;
}
-
+
double const h = (*i)->effective_height ();
if (yc.first >= 0 && yc.first < _track_height) {
@@ -687,7 +691,7 @@
yc.first -= _track_height;
yc.second -= _track_height;
}
-
+
/* hence required scale factor of the complete tracks to fit the required y range */
double const scale = ((_editor->canvas_height() - _editor->get_canvas_timebars_vsize()) - (total_height - scale_height)) / scale_height;
@@ -701,6 +705,16 @@
continue;
}
+ if(((*i)->effective_height() * scale) <= TimeAxisView::preset_height (HeightSmall)){
+
+ (*i)->set_height (TimeAxisView::preset_height (HeightSmall));
+
+ yc.first -= _track_height;
+ yc.second -= _track_height;
+
+ continue;
+ }
+
if (yc.first < 0 && yc.second > _track_height) {
(*i)->set_height ((*i)->effective_height() * scale);
}
@@ -709,6 +723,8 @@
yc.second -= _track_height;
}
+ _editor->_routes->resume_redisplay ();
+
set_editor_y (y.first);
}
|
|
|
Updated patch. Removed the un-needed if condition. |
|
|
Modified slightly and applied to SVN. Thanks! |
|
|
Issue has been closed automatically, by Trigger Close Plugin. Feel free to re-open with additional information if you think the issue is not resolved. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2010-11-09 00:04 | lincoln | New Issue | |
| 2010-11-09 00:04 | lincoln | File Added: editor-summary-yaxis-zoom.patch | |
| 2010-11-09 01:15 | cth103 | cost | => 0.00 |
| 2010-11-09 01:15 | cth103 | Target Version | => 3.0-beta1 |
| 2010-11-09 01:15 | cth103 | Summary | Vertical zooming using the summary view can make tracks too small => [PATCH] Vertical zooming using the summary view can make tracks too small |
| 2010-11-09 10:19 | lincoln | File Added: time-axis-view-clamp-min-height.patch | |
| 2010-11-10 18:35 | cth103 | Note Added: 0009387 | |
| 2010-11-10 18:35 | cth103 | Status | new => feedback |
| 2010-11-10 18:43 | lincoln | Note Added: 0009388 | |
| 2010-11-10 21:22 | lincoln | File Added: editor-summary-yaxis-zoom-2.patch | |
| 2010-11-10 21:22 | lincoln | Note Added: 0009389 | |
| 2010-11-10 21:55 | cth103 | Note Added: 0009390 | |
| 2010-11-10 21:55 | cth103 | Status | feedback => resolved |
| 2010-11-10 21:55 | cth103 | Resolution | open => fixed |
| 2010-11-10 21:55 | cth103 | Assigned To | => cth103 |
| 2020-04-19 20:14 | system | Note Added: 0022260 | |
| 2020-04-19 20:14 | system | Status | resolved => closed |