Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layout editor add check for unnecessary anchors #4513

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6e77743
Merge branch 'LayoutEditor-development' of https://github.com/JMRI/JM…
geowar1 Nov 19, 2017
83be456
Merge branch 'master' of https://github.com/JMRI/JMRI into LayoutEdit…
geowar1 Nov 20, 2017
7a16101
Merge branch 'LayoutEditor-development' of https://github.com/JMRI/JM…
geowar1 Nov 20, 2017
3c17b00
Merge branch 'master' into LayoutEditor-development
geowar1 Nov 25, 2017
266dda6
Merge branch 'master' of https://github.com/JMRI/JMRI into LayoutEdit…
geowar1 Nov 25, 2017
dbf9b45
Merge branch 'master' into LayoutEditor-development
geowar1 Dec 2, 2017
d2d2658
fix NPE when deleting last section of transit when only 2 left
Pugwash1 Dec 4, 2017
7044f3f
add a jemmy queuetool wait to see if we can eliminte an occasional hi…
pabender Dec 4, 2017
6236e36
SInce it hasnt gone yet.. Change to correct description.
Pugwash1 Dec 4, 2017
75a7f75
JComboBoxUtil.setupComboBoxMaxRows();-bump-by-one-when-isFirstItemBlank
geowar1 Dec 4, 2017
d7f843f
BUGFIX-foundObject-not-getting-cleared-on-mouseReleased
geowar1 Dec 4, 2017
23d4ebf
Merge pull request #4507 from pabender/master
pabender Dec 4, 2017
0366adf
Fix defaulticon element
silverailscolo Dec 4, 2017
fed17a5
Added comment to restart AppVeyor
geowar1 Dec 4, 2017
bec5355
Merge pull request #4505 from Pugwash1/Fix-NPESections-AutoTurnouts
bobjacobsen Dec 4, 2017
5ce1b3f
Merge pull request #4509 from geowar1/JComboBoxUtil.setupComboBoxMaxR…
bobjacobsen Dec 5, 2017
1154232
Merge pull request #4510 from geowar1/BUGFIX-foundObject-not-getting-…
bobjacobsen Dec 5, 2017
9f0d748
Merge pull request #4511 from silverailscolo/patch-5
bobjacobsen Dec 5, 2017
7d3466f
remade for 4.9.7
bobjacobsen Dec 5, 2017
adeb8fc
for 4.9.7
bobjacobsen Dec 5, 2017
7669a54
for 4.9.7
bobjacobsen Dec 5, 2017
9217013
for 4.9.7
bobjacobsen Dec 5, 2017
0d94fa6
'update release.build to value for next release'
bobjacobsen Dec 5, 2017
0a5b5fd
Merge branch 'LayoutEditor-development' of https://github.com/JMRI/JM…
geowar1 Dec 5, 2017
a43ad06
Merge branch 'master' of https://github.com/JMRI/JMRI into LayoutEdit…
geowar1 Dec 5, 2017
2e35681
LayoutEditor:Add Check for... Anchors attached to Zero-Length Track S…
geowar1 Dec 5, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file modified help/en/JavaHelpSearch/DOCS
Binary file not shown.
Binary file modified help/en/JavaHelpSearch/DOCS.TAB
Binary file not shown.
Binary file modified help/en/JavaHelpSearch/OFFSETS
Binary file not shown.
Binary file modified help/en/JavaHelpSearch/POSITIONS
Binary file not shown.
2 changes: 1 addition & 1 deletion help/en/JavaHelpSearch/SCHEMA
@@ -1,2 +1,2 @@
JavaSearch 1.0
TMAP bs=2048 rt=72 fl=-1 id1=15445 id2=1
TMAP bs=2048 rt=78 fl=-1 id1=15483 id2=1
Binary file modified help/en/JavaHelpSearch/TMAP
Binary file not shown.
6 changes: 6 additions & 0 deletions help/en/Map.jhm
Expand Up @@ -2048,6 +2048,8 @@

<mapID target="package.jmri.jmrit.withrottle.UserInterface" url="package/jmri/jmrit/withrottle/UserInterface.shtml"/>

<mapID target="html.hardware.loconet.Addressing_boards" url="html/hardware/loconet/Addressing.shtml#boards"/>

<mapID target="package.jmri.jmrix.secsi.nodeconfig.NodeConfigFrame" url="package/jmri/jmrix/secsi/nodeconfig/NodeConfigFrame.shtml"/>

<mapID target="manual.DecoderPro3.Comp_Analog" url="manual/DecoderPro3/Comp_Analog.shtml"/>
Expand Down Expand Up @@ -3218,6 +3220,8 @@

<mapID target="html.hardware.loconet.Digitrax" url="html/hardware/loconet/Digitrax.shtml"/>

<mapID target="html.doc.Technical.I8N_classkeysreport" url="html/doc/Technical/I8N.shtml#classkeysreport"/>

<mapID target="html.hardware.loconet.Digitrax_alternatives" url="html/hardware/loconet/Digitrax.shtml#alternatives"/>

<mapID target="html.apps.DecoderPro.LocoFile" url="html/apps/DecoderPro/LocoFile.shtml"/>
Expand Down Expand Up @@ -3778,6 +3782,8 @@

<mapID target="html.hardware.loconet.StandaloneLocoNet_pseudoground" url="html/hardware/loconet/StandaloneLocoNet.shtml#pseudoground"/>

<mapID target="html.doc.Technical.I8N_bundlekeysreport" url="html/doc/Technical/I8N.shtml#bundlekeysreport"/>

<mapID target="manual.DecoderPro3.Main_OakTreeSystems" url="manual/DecoderPro3/Main_OakTreeSystems.shtml"/>

<mapID target="package.jmri.jmrit.beantable.LogixTable_logixOptions" url="package/jmri/jmrit/beantable/LogixTable.shtml#logixOptions"/>
Expand Down
11 changes: 9 additions & 2 deletions java/src/jmri/jmrit/beantable/TransitTableAction.java
Expand Up @@ -770,12 +770,19 @@ void removeLastSectionPressed(ActionEvent e) {
curSequenceNum--;
curSection = sectionList.get(j - 1);
curSectionDirection = direction[j - 1];
// delete alternate if present
int k = j - 2;
while ((k >= 0) && alternate[k]) {
k--;
}
prevSection = sectionList.get(k);
prevSectionDirection = direction[k];
// After this delete we need the new previous section, if there is one.
if (k < 0) {
// There is no previous section
prevSection = null;
} else {
prevSection = sectionList.get(k);
prevSectionDirection = direction[k];
}
}
sectionList.remove(j);
initializeSectionCombos();
Expand Down
35 changes: 11 additions & 24 deletions java/src/jmri/jmrit/dispatcher/AutoTurnouts.java
Expand Up @@ -184,30 +184,17 @@ private boolean turnoutUtil(Section s, int seqNum, Section nextSection,
// next Block is outside of the Section
nextBlock = exitPt.getFromBlock();
} else {
if (!at.isAllocationReversed()) {
if (direction == Section.FORWARD) {
nextBlock = s.getBlockBySequenceNumber(curBlockSeqNum + 1);
nextBlockSeqNum = curBlockSeqNum + 1;
} else if (direction == Section.REVERSE) {
nextBlock = s.getBlockBySequenceNumber(curBlockSeqNum - 1);
nextBlockSeqNum = curBlockSeqNum - 1;
}
if ((nextBlock == null) && (curBlock != at.getEndBlock())) {
log.error("Error in block sequence numbers fwd when setting/checking turnouts");
return false;
}
} else {
if (direction == Section.REVERSE) {
nextBlock = s.getBlockBySequenceNumber(curBlockSeqNum + 1);
nextBlockSeqNum = curBlockSeqNum + 1;
} else if (direction == Section.FORWARD) {
nextBlock = s.getBlockBySequenceNumber(curBlockSeqNum - 1);
nextBlockSeqNum = curBlockSeqNum - 1;
}
if ((nextBlock == null) && (curBlock != at.getStartBlock())) {
log.error("Error in block sequence numbers rev when setting/checking turnouts");
return false;
}
// next Block is inside the Section
if (direction == Section.FORWARD) {
nextBlock = s.getBlockBySequenceNumber(curBlockSeqNum + 1);
nextBlockSeqNum = curBlockSeqNum + 1;
} else if (direction == Section.REVERSE) {
nextBlock = s.getBlockBySequenceNumber(curBlockSeqNum - 1);
nextBlockSeqNum = curBlockSeqNum - 1;
}
if ((nextBlock == null) && (curBlock != at.getEndBlock())) {
log.error("Error in block sequence numbers when setting/checking turnouts");
return false;
}
}

Expand Down
4 changes: 2 additions & 2 deletions java/src/jmri/jmrit/dispatcher/DispatcherBundle.properties
Expand Up @@ -112,8 +112,8 @@ DestinationBlockBoxLabel = Destination Location of Train
DestinationBlockBoxHint = Select the Block where the Train will be located when Transit ends.
AutoRun = Run Train Automatically
AllocateMethodLabel = Allocation Method
AllocateMethodBoxHint = Number of Blocks ahead to auto allocate
NumberOfBlocks = Number of Blocks
AllocateMethodBoxHint = Number of Sections ahead to auto allocate
NumberOfBlocks = Number of Sections
AsFarAsPos = As Far As Pos
ToSafeSections = To Safe Secs
UseSpeedProfileLabel = Use Speed Profile
Expand Down
12 changes: 10 additions & 2 deletions java/src/jmri/jmrit/display/layoutEditor/LayoutEditor.java
Expand Up @@ -2090,10 +2090,13 @@ public static void setupComboBox(@Nonnull JmriBeanComboBox inComboBox, boolean i
inComboBox.setValidateMode(inValidateMode);
inComboBox.setText("");

// This has to be set before calling setupComboBoxMaxRows
// (otherwise if inFirstBlank then the number of rows will be wrong)
inComboBox.setFirstItemBlank(inFirstBlank);

// set the max number of rows that will fit onscreen
JComboBoxUtil.setupComboBoxMaxRows(inComboBox);

inComboBox.setFirstItemBlank(inFirstBlank);
inComboBox.setSelectedIndex(-1);
} //setupComboBox

Expand Down Expand Up @@ -2849,7 +2852,7 @@ public void menuCanceled(MenuEvent event) {
/*============================================*\
|* LayoutTrackDrawingOptions accessor methods *|
\*============================================*/
private LayoutTrackDrawingOptions layoutTrackDrawingOptions = null;
private transient LayoutTrackDrawingOptions layoutTrackDrawingOptions = null;

public LayoutTrackDrawingOptions getLayoutTrackDrawingOptions() {
if (layoutTrackDrawingOptions == null) {
Expand Down Expand Up @@ -5707,6 +5710,11 @@ && allControlling() && !isMetaDown(event) && !event.isAltDown() && !event.isPopu
prevSelectedObject = selectedObject;
selectedObject = null;
}

// clear these
beginObject = null;
foundObject = null;

isDragging = false;
delayedPopupTrigger = false;
requestFocusInWindow();
Expand Down
Expand Up @@ -636,7 +636,8 @@ CheckUnBlockedTracksMenuTitle = Un-Blocked Tracks
CheckUnBlockedTracksMenuToolTip = Select this to check for tracks that do not have an assigned block
CheckNonContiguousBlocksMenuTitle = Non-Contiguous Blocks
CheckNonContiguousBlocksMenuToolTip = Select this to check for blocks that are not contiguous

CheckUnnecessaryAnchorsMenuTitle = Unnecessary Anchors
CheckUnnecessaryAnchorsMenuToolTip = Select this to check if the adjacent track segments can be merged
#LayoutTrackDrawingOptionsDialog properties
#
# the presets
Expand Down