10-18-2011 / Phil Weinstein Short Description: Fix to CRASH applying edit to strange selections in RPL Bug Number: 5111 Release notes (y/n): Yes For Release Nums: 6.1 Gnats 5111: Crash applying edit to selected top-level Rpl Function or Block Execution Constraint. Original Title: Crash when writing RPL logic The RplFrame::replaceTokenNoUndo() which is invoked when editing (replacing) the selected Rpl object (sub-expression). That method supports top-level selections only for the BLOCK_STATEMENTS and FUNCTION_VALUE_CONSTRAINTS RplFrame applications. It was crashing when being called with top-level selections in the other applications. The solution is to prevent top-level selections within RplFrame applications not supported by that method. This is done with a change to the VisualToken ::contains method. See Gnats 5111 analysis: https://cadswes2.colorado.edu/~philw/2011/bugs/5111/ --------------------- QtRpl/VisualToken.cpp --------------------- In method: VisualToken* VisualToken::contains(int x, int y) ... exclude FUNCTION_SYMBOL and BLOCK_EXEC_CONSTRAINT_SYMBOL symbols from processing. This results in top-level items not being selected within the RplFrame (RPL Editor). ------------------ QtRpl/RplFrame.cpp ------------------ Better internal-error handling in method: RplFrame::replaceTokenNoUndo(). ---