forked from mia/Aegisub
Layer and margin columns are no longer shown if all lines have default values for those.
Originally committed to SVN as r1338.
This commit is contained in:
parent
79e3e49cf4
commit
075bb0184c
2 changed files with 15 additions and 5 deletions
|
@ -769,6 +769,9 @@ void BaseGrid::SetColumnWidths() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// O(n) widths
|
// O(n) widths
|
||||||
|
bool showMargin[3];
|
||||||
|
showMargin[0] = showMargin[1] = showMargin[2] = false;
|
||||||
|
bool showLayer = false;
|
||||||
int styleLen = 0;
|
int styleLen = 0;
|
||||||
int actorLen = 0;
|
int actorLen = 0;
|
||||||
int effectLen = 0;
|
int effectLen = 0;
|
||||||
|
@ -780,7 +783,10 @@ void BaseGrid::SetColumnWidths() {
|
||||||
curDiag = GetDialogue(i);
|
curDiag = GetDialogue(i);
|
||||||
if (curDiag) {
|
if (curDiag) {
|
||||||
// Layer
|
// Layer
|
||||||
if (curDiag->Layer > maxLayer) maxLayer = curDiag->Layer;
|
if (curDiag->Layer > maxLayer) {
|
||||||
|
maxLayer = curDiag->Layer;
|
||||||
|
showLayer = true;
|
||||||
|
}
|
||||||
|
|
||||||
// Actor
|
// Actor
|
||||||
if (!curDiag->Actor.IsEmpty()) {
|
if (!curDiag->Actor.IsEmpty()) {
|
||||||
|
@ -800,6 +806,11 @@ void BaseGrid::SetColumnWidths() {
|
||||||
if (fw > effectLen) effectLen = fw;
|
if (fw > effectLen) effectLen = fw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Margins
|
||||||
|
for (int j=0;j<3;j++) {
|
||||||
|
if (curDiag->Margin[j] != 0) showMargin[j] = true;
|
||||||
|
}
|
||||||
|
|
||||||
// Times
|
// Times
|
||||||
if (byFrame) {
|
if (byFrame) {
|
||||||
int tmp = VFR_Output.GetFrameAtTime(curDiag->Start.GetMS(),true);
|
int tmp = VFR_Output.GetFrameAtTime(curDiag->Start.GetMS(),true);
|
||||||
|
@ -841,15 +852,13 @@ void BaseGrid::SetColumnWidths() {
|
||||||
|
|
||||||
// Set column widths
|
// Set column widths
|
||||||
colWidth[0] = labelLen;
|
colWidth[0] = labelLen;
|
||||||
colWidth[1] = layerLen;
|
colWidth[1] = showLayer ? layerLen : 0;
|
||||||
colWidth[2] = startLen;
|
colWidth[2] = startLen;
|
||||||
colWidth[3] = endLen;
|
colWidth[3] = endLen;
|
||||||
colWidth[4] = styleLen;
|
colWidth[4] = styleLen;
|
||||||
colWidth[5] = actorLen;
|
colWidth[5] = actorLen;
|
||||||
colWidth[6] = effectLen;
|
colWidth[6] = effectLen;
|
||||||
colWidth[7] = marginLen;
|
for (int i=0;i<3;i++) colWidth[i+7] = showMargin[i] ? marginLen : 0;
|
||||||
colWidth[8] = marginLen;
|
|
||||||
colWidth[9] = marginLen;
|
|
||||||
|
|
||||||
// Hide columns
|
// Hide columns
|
||||||
for (int i=0;i<10;i++) {
|
for (int i=0;i<10;i++) {
|
||||||
|
|
|
@ -104,6 +104,7 @@ Please visit http://aegisub.net to download latest version
|
||||||
o Added Paste Over function, which allows you to paste subtitle lines over others, overwriting the fields of your choice. (AMZ)
|
o Added Paste Over function, which allows you to paste subtitle lines over others, overwriting the fields of your choice. (AMZ)
|
||||||
o Scrollbar in grid didn't always allow scrolling through all the subs. (jfs)
|
o Scrollbar in grid didn't always allow scrolling through all the subs. (jfs)
|
||||||
o Minor fix to the calculation of the grid's "Style" column width. (AMZ)
|
o Minor fix to the calculation of the grid's "Style" column width. (AMZ)
|
||||||
|
o Layer and margin columns are no longer shown if all lines have default values for those. (AMZ)
|
||||||
- Subtitles edit box changes:
|
- Subtitles edit box changes:
|
||||||
o The whole layout has been tweaked. (AMZ)
|
o The whole layout has been tweaked. (AMZ)
|
||||||
o Replaced wxTextCtrl with wxStyledTextCtrl, to solve many issues related to the Rich Text edit control. (AMZ)
|
o Replaced wxTextCtrl with wxStyledTextCtrl, to solve many issues related to the Rich Text edit control. (AMZ)
|
||||||
|
|
Loading…
Reference in a new issue