//=========================================================================
-int wxVtkSceneManager::createGConnector(GPortModel* startPort) {
+int wxVtkSceneManager::createGConnector(GPortModel* startPort)
+{
+
+
+
int type = GCONNECTOR;
manualConnectorContourController *manContourControl = new manualConnectorContourController();
manContourView->SetColorEditContour(0.5, 0.5, 0.5);
manContourView->SetColorSelectContour(1, 0.8, 0);
+
+
/**
* JGRR AND CM
* Width increased from 2 to 3, it simplifies line handling and spline control :P
// The last one is the controller of the connector
std::map<int, GObjectController*>::iterator it2;
+
for (it2 = _controllers.begin(); it2 != _controllers.end(); ++it2) {
GObjectController *cont = it2->second;
if (cont->getGObjectType() == GPORT) {
// FillPortText
px = px - 33;
- py = py;
+ //py = py;
_fillObjectActor->SetScale(1);
_fillObjectActor->GetProperty()->SetOpacity(0.50);
_fillObjectActor->SetPosition(px, py, 1);
//=========================================================================
-bool wxVtkSceneManager::OnRightButtonUp() {
- if (_worldState == INIT_CREATION_CONTOUR) {
+bool wxVtkSceneManager::OnRightButtonUp()
+{
+ if (_worldState == INIT_CREATION_CONTOUR)
+ {
CancelConnection();
}
UnSelectBlackBoxes();
// KeyCode 127 : Delete Key
// KeyCode 8 : Backspace Key
+
+
+ if (keyCode == 8 || keyCode == 127 || keyCode == 27)
+ {
+ if (_worldState == INIT_CREATION_CONTOUR)
+ {
+ CancelConnection();
+ UnSelectBlackBoxes();
+ }
+ }
+
+
if (keyCode == 8 || keyCode == 127)
{
+
for (int i = 0; i < (int) _selectedObjects.size(); i++)
{
int id = _selectedObjects[i];
{
getline(inputStream, line,'\n');
int size = line.length();
- if ( line[ size-1 ]==13 )
+ if (size>0)
{
- line.erase(size-1,1);
- }
+ if ( line[ size-1 ]==13 )
+ {
+ line.erase(size-1,1);
+ } // if line
+ } // if size
}
//=========================================================================
-
void wxVtkSceneManager::loadDiagram(stringstream &inputStream)
{
int size;
//=========================================================================
void wxVtkSceneManager::SetDescription(std::string description) {
_Description = description;
+ std::cout<<"Description:"<<_Description<<std::endl;
if (_Description == "") {
_Description = "<description of the box>";
}